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
Reply
 
LinkBack Thread Tools Display Modes
July 29th, 2017, 10:38 AM   #1
Senior Member
 
SenatorArmstrong's Avatar
 
Joined: Nov 2015
From: United States of America

Posts: 154
Thanks: 19

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, 11:12 AM   #2
Senior Member
 
romsek's Avatar
 
Joined: Sep 2015
From: Southern California, USA

Posts: 1,512
Thanks: 761

use {} to enclose the table iterator
Thanks from greg1313
romsek is online now  
Reply

  My Math Forum > Math Forums > Math Software

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 exeriment-need help finding "statistic" and "result" katie0127 Advanced Statistics 0 December 3rd, 2008 01:54 PM
terms "non-increasing" or "non-decreasing" Ujjwal Number Theory 2 September 29th, 2008 07:06 AM





Copyright © 2017 My Math Forum. All rights reserved.