
Math Software Math Software  Mathematica, Matlab, Calculators, Graphing Software 
 LinkBack  Thread Tools  Display Modes 
July 29th, 2017, 10:38 AM  #1 
Senior Member Joined: Nov 2015 From: United States of America Posts: 167 Thanks: 21 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, 11:12 AM  #2 
Senior Member Joined: Sep 2015 From: USA Posts: 1,863 Thanks: 971 
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 11:45 AM 
"separate and integrate" or "Orangutang method"  The Chaz  Calculus  1  August 5th, 2011 09:03 PM 
sample exerimentneed help finding "statistic" and "result"  katie0127  Advanced Statistics  0  December 3rd, 2008 01:54 PM 
terms "nonincreasing" or "nondecreasing"  Ujjwal  Number Theory  2  September 29th, 2008 07:06 AM 