Mathematica Asked by AlistairLR112 on May 27, 2021
I am currently using Mathematica to solve
$frac{mathrm{d}x(t) }{mathrm{d} t} = cv_{H} (1-x) + beta x(1-x) – (gamma_{min} – v_{D}(gamma_{max} – gamma_{min}))x$ with $ x(0) = 0$.
In the formulation, I have set $beta = 0.21$, $c = 0.95$, $gamma_{min} = 0.47$, $gamma_{max} = 0.79$ so that the output is easier to read.
sol = DSolve[{x'[t] == 0.95*v1*(1 - x[t]) + 0.21*x[t]*(1 - x[t]) -
(0.47 + v2*(0.79 - 0.47))*x[t],
x[0] == 0}, x, t]
Note: v1
is $v_{H}$ and v2
is $v_{D}$
This is followed by:
DSolve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.
and then 4 solutions to the equation. What do they all mean? Does this mean I can just pick one of these and it should satisfy everything I need?
Thanks
An alternative approach is
int = Integrate[1/(0.95*v1*(1 - x) + 0.21*x*(1 - x) - (0.47 + v2*(0.79 - 0.47))*x), x]
// FullSimplify;
First@Solve[t == int - (int /. x -> 0), x] // FullSimplify
(* {x -> -0.619048 - 2.2619 v1 - 0.761905 v2 - 2.2619 Sqrt[-0.074903 - 1. v1^2 +
v1 (-1.43158 - 0.673684 v2) + (-0.184377 - 0.113463 v2) v2]
Tan[0.475 t Sqrt[-0.074903 - 1. v1^2 +
v1 (-1.43158 - 0.673684 v2) + (-0.184377 - 0.113463 v2) v2] -
1. ArcTan[(1.2381 + 4.52381 v1 + 1.52381 v2)/(Sqrt[(-1.53288 - 20.4649 v1^2 +
v1 (-29.2971 - 13.7868 v2) + (-3.77324 - 2.322 v2) v2)])]]} *)
A sample plot is
Plot[x /. % /. {v1 -> 1, v2 -> 1}, {t, 0, 5}, PlotRange -> All, AxesLabel -> {t, x}]
Correct answer by bbgodfrey on May 27, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP