
Math Software Math Software  Mathematica, Matlab, Calculators, Graphing Software 
 LinkBack  Thread Tools  Display Modes 
July 29th, 2017, 11:38 AM  #1 
Senior Member 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? 
July 29th, 2017, 12:12 PM  #2 
Senior Member Joined: Sep 2015 From: USA Posts: 2,299 Thanks: 1220 
use {} to enclose the table iterator


Tags 
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"...help  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 exerimentneed help finding "statistic" and "result"  katie0127  Advanced Statistics  0  December 3rd, 2008 02:54 PM 
terms "nonincreasing" or "nondecreasing"  Ujjwal  Number Theory  2  September 29th, 2008 08:06 AM 