My Math Forum  

Go Back   My Math Forum > Math Forums > Math Software

Math Software Math Software - Mathematica, Matlab, Calculators, Graphing Software

Thanks Tree1Thanks
  • 1 Post By romsek
LinkBack Thread Tools Display Modes
July 29th, 2017, 11:38 AM   #1
Senior Member
SenatorArmstrong's Avatar
Joined: Nov 2015
From: United States of America

Posts: 187
Thanks: 25

Math Focus: Calculus and Physics
Mathematica "cannot be followed by"

I am trying to create a program to solve Lagrange Multiplier problems.

LAGRANGE[f0_, g0_] := Module[{f = f0, g = g0}, 1 = Union[Variables[f], Variables[g]]]; Gradf =Table[D[f, 1[[i]]], (i, 1, Length[1])]; GradG =
Table[D[g, 1[[i]]], (i, 1, Length[1])];
Solve[{Gradf == \[Lambda] GradG, g == 0}, Append[1, \[Lambda]]]

I get a syntax error then: Syntax::sntxf: "(" cannot be followed by "i,1,Length[1])".

Would anyone happen to be familiar with this syntax error?
SenatorArmstrong is offline  
July 29th, 2017, 12:12 PM   #2
Senior Member
romsek's Avatar
Joined: Sep 2015
From: USA

Posts: 2,299
Thanks: 1220

use {} to enclose the table iterator
Thanks from greg1313
romsek is offline  

  My Math Forum > Math Forums > Math Software

cannot be followed by, mathematica

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
A "simple" application of dirac delta "shift theorem" SedaKhold Calculus 0 February 13th, 2012 12:45 PM
"separate and integrate" or "Orangutang method" The Chaz Calculus 1 August 5th, 2011 10:03 PM
sample exeriment-need help finding "statistic" and "result" katie0127 Advanced Statistics 0 December 3rd, 2008 02:54 PM
terms "non-increasing" or "non-decreasing" Ujjwal Number Theory 2 September 29th, 2008 08:06 AM

Copyright © 2019 My Math Forum. All rights reserved.