MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Problems with a first order differential equation

  • To: mathgroup at
  • Subject: [mg123282] Problems with a first order differential equation
  • From: Pippo <dinodeblasio at>
  • Date: Wed, 30 Nov 2011 03:21:00 -0500 (EST)
  • Delivered-to:

Dear all,

I have a list of values (2-dimensional). data={{xi,yi}...}
And I finally am able to fit them as the example below:
and find the parameters A and B
data = {{1, 0.033}, {2, 0.054}, {5, 0.088}}; 
With[{C = 1/9}, 
    model = DSolve[ 
       {y'[t] == -A (y[t])^2 + B (C - y[t]), y[0] == 0}, 
       y[t], t][[1]], 
    param = FindFit[data, y[t] /. model, {A, B}, t], 
    Plot[y[t] /. model /. param, {t, 0, Max[data[[All, 1]]]}, 
     ImageSize -> 400, AxesLabel -> {"t", "y[t]"}, 
     Epilog -> {Red, AbsolutePointSize[5], Point[data]}]}]] // Quiet 
Thanks to Bob Hanlon.

However I would like to fit the same data by using different exponents of the term y[t])^2 which appear on the right hand side of the differential equation:
for example I'd like to use:

{y'[t] == -A (y[t])^3 + B (C - y[t]), y[0] == 0}, 
{y'[t] == -A (y[t])^(2.5) + B (C - y[t]), y[0] == 0}, 

Is that anyway to fit a list of two-dimensional by using the models above?


  • Prev by Date: Re: how to get string in sci. notation to a number?
  • Next by Date: Re: Point light source penetrating through surfaces
  • Previous by thread: Re: A function to do incomplete LU decomposition with a drop tolerance?
  • Next by thread: Manipulate bug (?) when stepping by degrees?