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

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
FRanc Solina Gilbert
10/05/05 4:48pm

Hi yehuda :),

Thanks for the advices -:). I start understanding Mathematica. I have found a posible solution to my problem. Since g[t] is my system's input (vibration initiator) and I replace g[t] by an Mathematica interpolated polynomial of the kind

\!\(HSE[a_?NumberQ, b_?NumberQ, c_?NumberQ, d_?NumberQ] := Block[{sol,
f}, sol = \(NDSolve[{\((a + b\ Abs[f[t]] + c\
f[t]\^2 + d\ Abs[f[t]\^3])\)\ f[
t] + c\ \(f'\)[
t] == \(-0.2200821389305352`\) +
2.6933892154486747`\ t - 2.898740511629984`\ t\^2 +
1.4915822724657741`\ t\^3\ , f[0] == 0}, f, {t,
0, 500}, Method -> "\<Automatic\>"]\)[\([1]\)];
Plus @@ Apply[\((f[#1] - #2)\)^2 &, data, {
1}] /. sol]; NMinimize[HSE[A, B, C, D], {A, B, C, D}, \
Method -> "\<NelderMead\>"]\)

then I get after some error massages a solution to my problem. Mathematica does a least square fit of the parameters (a,b,c,d). Now, lets come to the error massages:

NDSolve::ndcf. Repeated convergence test failure at t == 123.06374629313223; unable to continue.

NDSolve::ndsz: At t == 18.585850047911073`, step size is effectively zero; singularity or stiff system suspected

I assume that the singularity in my system result from a polynomial attempt. Because, when I replace the right side of the equation with, a periodic attempt of the kind Sin[t]+(Sin[t])^2, then Mathematica finds automatically a least square fit to my problem. Now the system is not singular anymore. Normally Mathematica tries a polynomial interpolation. I would like to use a Fourier interpolation. I concentrate myself at the moment to periodic input signals. So a Fourier analysis is something to thing about. Is there a possibility to do that with the aim to get a peridical interpolation function for g[t]?

Regards, Franc

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