Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6887 > unrolled thread

Problems with fitting a first order differential equation

Started byDino <dinodeblasio@gmail.com>
First post2011-12-02 12:23 +0000
Last post2011-12-02 12:23 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Problems with fitting a first order differential equation Dino <dinodeblasio@gmail.com> - 2011-12-02 12:23 +0000

#6887 — Problems with fitting a first order differential equation

FromDino <dinodeblasio@gmail.com>
Date2011-12-02 12:23 +0000
SubjectProblems with fitting a first order differential equation
Message-ID<jbafvq$1to$1@smc.vnet.net>
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
-----------------------------------
Clear[y];
data = {{1, 0.033}, {2, 0.054}, {5, 0.088}};
With[{C = 1/9},
Column[{
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},
or
{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?

Thanks.
Dino

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web