Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'FindMinimum behavior different between v4 and v5?' topicStudent Support Forum > General > "FindMinimum behavior different between v4 and v5?"

Next Comment >Help | Reply To Topic
Author Comment/Response
Julius Su
11/07/03 6:34pm

Hello, I have a short piece of Mathematica code (written to reproduce
the difference) that behaves differently between v4.2 and v5.0.

Under v4.2:

In[1]:= f[b_] := FindMinimum[(x - a)^2 + (b + a^2), {x, 0}][[1]]

In[2]:= FindMinimum[f[1], {a, 1, 1.1}]
-16
Out[2]= {1., {a -> 4.78784 10 }}

Under v5.0:

In[1]:= f[b_] := FindMinimum[(x - a)^2 + (b + a^2), {x, 0}][[1]]

In[2]:= FindMinimum[f[1], {a, 1, 1.1}]

FindMinimum::nlnum :
The function value {1. a, 1. (0.-1.a)} is not a list
of nummbers with dimensions (2) at {x} = {0.}.

FindMinimum::nnum : The function value
2.+(-1.+x)2 is not a number at {a} = {1.}.

Does anyone know how to change the code so it will work under v5.0? (the actual problem is lengthier, but this code fragment reproduces the desired behavior).

Thanks,

Julius
jsu@caltech.edu

URL: ,

Subject (listing for 'FindMinimum behavior different between v4 and v5?')
Author Date Posted
FindMinimum behavior different between v4 and v5? Julius Su 11/07/03 6:34pm
Re: FindMinimum behavior different between v4 a... Randy Silvers 11/12/03 4:09pm
Re: FindMinimum behavior different between v4 a... tzeller 11/14/03 06:34am
Re: FindMinimum behavior different between v4 a... Julius Su 11/17/03 3:13pm
Next Comment >Help | Reply To Topic