Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Data Fitting to Differential Equations' topicStudent Support Forum > General > Archives > "Data Fitting to Differential Equations"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
yehuda ben-shimol
09/30/05 00:25am

Dear Frank,
your code will not work even for the 2D case. did you really check it on 2D?
1. First, you are using NDSolve with non numerical values for A,B,C,D, seaking for a general form of a solution and by optimization tries to set the values for A,B,C,D. NDSolve is not working this way, since it is a collection of NUMERICAL algorithms, you cannot get a solution to ODE/PDE (linear or non-linear) with non numerical coefficients. You do not need a complicated example to see that, just try
NDSolve[{f'[t] + a f[t] == 0, f[0] == 1}, f[t], {t, 0, 10}]
and look at the error messages

2.In addition, DO NOT use D as a variable. It is used Internally by Mathematica for derivatives, so be aware. (I replaced it with DD). Also it is recommended that as a general rule of thumb, always start your variable names with a small letter. This is much safer.
3. as for the 3D case, what do you really want to do with the third argument? this is not explained, so I cannot predict it. for the 2D case you used (f[#1]-#2)^2&, if you want to take care of the thirsd argument call it #3
4. Plus@@Apply???? this is bad syntax

So, in general, your concept for looking for the A,B,C,DD will not do and you need to think of another way
I hope this is of help for you
regards
yehuda

URL: ,

Subject (listing for 'Data Fitting to Differential Equations')
Author Date Posted
Data Fitting to Differential Equations Dr. Frank So... 09/28/05 6:01pm
Re: Data Fitting to Differential Equations yehuda ben-s... 09/30/05 00:25am
Re: Data Fitting to Differential Equations Frank Solina... 09/30/05 4:12pm
Re: Data Fitting to Differential Equations Frank Solina... 10/01/05 08:26am
Re: Data Fitting to Differential Equations yehuda ben-s... 10/02/05 2:20pm
Re: Data Fitting to Differential Equations FRanc Solina... 10/05/05 4:48pm
Re: Data Fitting to Differential Equations Franc Solina... 10/13/05 09:12am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic