Mathematica Asked on February 11, 2021
I want to solve the following differential equation which is a very common growth law model in biology — a generalization of the logistic equation. In this case, the equation possesses a power-law factor 3/4.
$$frac{dx}{dt}= 4 A k left(frac{x(t)}{A}right)^{3/4}-3 k x(t)$$
The problem is to obtain the analytical solution for a certain initial condition
$x(t)=B_0$, where $A$ and $k$ and $B_0$ are positive constants.
I evaluated
DSolve[{x'[t] == -2 k x[t] + 3 A k (x[t]/A)^(2/3), x[0] == B}, x, t]
and obtained four solutions. It is difficult for me to interpret the solutions.
I am interested in solving for an arbitrary initial condition, X(0)=B y A (without giving a particular value)
I get the following message:
Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.
How can I solve this differential equation using Mathematica? What more can be done with Mathematica?
To make things a little simpler, we solve for x[t]
instead of x
, like this
soln = DSolve[{x'[t] == -2 k x[t] + 3 A k (x[t]/A)^(2/3), x[0] == B},
x[t], t];
We obtain 6 possible solutions.
Let's check the first solution at the initial condition x[0] == B
using Reduce
Reduce[(x[t] == B) /. soln[[1]] /. t -> 0, {A, B}, Reals]
$$left(A<0land B=frac{27 A}{8}right)lor left(A>0land B=frac{27 A}{8}right)$$
This says that soln[[1]]
satisfies the IC for any any positive $A$ provided $B = 27A/8$. However, with this IC we get x'[0] = 0, the steady-state condition, which leads to the trivial solution $x(t)=27A/8$.
Now let's see if soln[[2]]
satisfies the IC for any positive values of A & B:
Reduce[(x[t] == B) /. soln[[2]] /. t -> 0, {A, B}, Reals]
$$ left(A<0land frac{27 A}{8}leq B<0right)lor left(A>0land left(B<0lor 0<Bleq frac{27 A}{8}right)right) $$
For $0<A$, soln[[2]]
satisfies the IC for $0<Ble 27A/8$. For the other 4 solutions Reduce
is unable to find real values of A & B that satisfy the IC.
The second solution looks good at t=0. Let's plot its real and imaginary parts like this
Manipulate[ ReImPlot[
Evaluate[x[t] /. soln[[{2}]] /. k -> kk /. A -> a /. B -> b],
{t, 0, 5}, PlotRange -> {All, {-5, 20}}],
{{a, 3, "A"}, .1, 5, .1},
{{b, 2, "B"}, 0.01, 15, .01},
{{kk, 1, "k"}, 0, 5, 1}]
This plot shows the imaginary part of soln[[2]]
remains zero for all $t>0$ provided the value of B is sufficiently small.
We can use almost the same code to examine the other "solutions". For example, We can replace soln[[{2}]]
with soln[[{3,5}]]
and adjust the plot range in the above statement to obtain a plot of soln[[3]]
and soln[[5]]
.
This plot shows those complex conjugate functions have imaginary parts for values of $t>0$.
We conclude that the analytical solution we want is given by soln[[2]]
and the conditions $A>0$, $0<B< 27A/8$.
Answered by LouisB on February 11, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP