1
$\begingroup$

I'm not a mathematician so I apologize if what I'm asking is trivial. I'm trying to solve a system of three differential equations: $$ \frac{dA}{d t} = -k_1A(t)+k_{-1}B(t)-nA(t)\frac{dC}{d t} $$ $$ \frac{dB}{d t} = k_1A(t)-k_{-1}B(t)-(nA(t)-1)\frac{dC}{d t} $$ $$ \frac{dC}{d t} =k_2B(t)A(t)^{nA(t)} $$ with the conditions $$ B(0) = 0 $$ and $$ C(0) = 0 $$

However, dsolve does not provide an answer - it just runs for a long time. Any help would be appreciated!

Here's the code used in Mathematica:

DSolve[{a'[t] == -k1 a[t] + k11 b[t] - n a[t] c'[t], 
  b'[t] == k1 a[t] - k11 b[t] + (n a[t] - 1) c'[t], 
  c'[t] == k2 b[t] a[t]^(n a[t]), b[0] == 0, c[0] == 0},
 {a[t], b[t], c[t]}, t]

More information that might be relevant: k1, k11 and k2 are positive and real, typically between 0 and 1. n is between 1 and 4 or so.

And a follow up question - can I use ndsolve to determine the above mentioned parameters, given some c[t] datapoints?

$\endgroup$
  • $\begingroup$ Please add the code you used in Mathematica. Because a) we're lazy and b) there might be typos $\endgroup$ – AndreasP Oct 18 '16 at 14:23
  • $\begingroup$ Here: DSolve[{a'[t] == -k1 a[t] + k11 b[t] - n a[t] c'[t], b'[t] == k1 a[t] - k11 b[t] + (n a[t] - 1) c'[t], c'[t] == k2 b[t] a[t]^(n a[t]), b[0] == 0, c[0] == 0}, {a[t], b[t], c[t]}, t] $\endgroup$ – Igor Oct 18 '16 at 14:25
  • $\begingroup$ What are the values of k1 etc.? $\endgroup$ – corey979 Oct 18 '16 at 14:38
  • 2
    $\begingroup$ The system is nonlinear, so a closed-form solution may not exist. Try NDSolve to get a numerical solution. $\endgroup$ – Chris K Oct 18 '16 at 14:41
  • $\begingroup$ Why not immediately eliminate C? $C$ itself doesn't matter to $dA/dt$ and $dB/dt$---only $dC/dt$ does, and you have an expression for that quantity. I still don't think there will be a closed-form solution (because of $A^A$) but Mma should be able to find a numeric solution. $\endgroup$ – evanb Oct 18 '16 at 15:47
1
$\begingroup$

This system can be solved numerically and generally with ParametricNDSolve, if you specify an initial condition for a[0] (which I picked to be 1 below for concreteness).

soln = ParametricNDSolve[{a'[t] == -k1 a[t] + k11 b[t] - n a[t] c'[t],
    b'[t] == k1 a[t] - k11 b[t] + (n a[t] - 1) c'[t], 
    c'[t] == k2 b[t] a[t]^(n a[t]), b[0] == 0, c[0] == 0, 
    a[0] == 1}, {a[t], b[t], c[t]}, {t, 0, 10}, {k1, k11, k2, n}]

Now you can play with various values of the coefficients

Manipulate[Plot[Evaluate[
   Through[({a[t], b[t], c[t]} /. soln)[k1, k11, k2, n]]], 
   {t, 0, 10}, PlotRange -> All],
   {k1, 0, 1}, {k11, 0, 1}, {k2, 0, 1}, {n, 1, 4}]

where I chose the ranges of the parameters based on your suggestion. This gives a little Manipulated plot:

example manipulate choice

To get the functions themselves, you can do eg.

{AA[t_], BB[t_], CC[t_]} := Evaluate[
    Through[({a[t], b[t], c[t]} /. soln)[k1, k11, k2, n]]]

where you plug in concrete numerical values of k1, k11, k2, n. Then you can use AA, BB, CC as functions (ie. A[3] will produce a numerical value).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.