3
$\begingroup$

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

$\endgroup$
8
  • $\begingroup$ Why don't you plot them all and see which one makes sense? $\endgroup$
    – march
    Dec 26, 2015 at 17:12
  • $\begingroup$ If I rationalize, don't use the initial condition and look at the general solution it sometimes gives me insight. sol = Simplify[x[t] /. Solve[x'[t] == 95/100*v1*(1-x[t]) + 21/100*x[t]*(1-x[t]) - (47/100 + v2*(79/100 - 47/100))*x[t], x[t], t][[1]]] $\endgroup$
    – Bill
    Dec 26, 2015 at 17:17
  • $\begingroup$ The output there is much nicer! I can work with the output and determine the C[1] constant by hand hopefully. Thank you. $\endgroup$ Dec 26, 2015 at 17:22
  • $\begingroup$ And when you are done you can compare your C[1] with the output of Simplify[Reduce[(sol/.t->0)==0,C[1]]] $\endgroup$
    – Bill
    Dec 26, 2015 at 17:29
  • $\begingroup$ I am confused about the output that has been produced from that: (v1 == 0 && v2 == -(13/16)) || (C[2] $\in$ Integers && 9025 v1^2 + 760 v1 (17 + 8 v2) + 4 (13 + 16 v2)^2 != 0 && v1 (9025 v1^2 + 760 v1 (17 + 8 v2) + 4 (13 + 16 v2)^2) != 0 && C[1] == ( 2 (ArcTan[(26 + 95 v1 + 32 v2)/ Sqrt[-9025 v1^2 - 760 v1 (17 + 8 v2) - 4 (13 + 16 v2)^2]] + \[Pi] C[2]))/ Sqrt[-9025 v1^2 - 760 v1 (17 + 8 v2) - 4 (13 + 16 v2)^2]) $\endgroup$ Dec 26, 2015 at 17:58

1 Answer 1

4
$\begingroup$

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}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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