1
$\begingroup$

If we take

$$\frac{\text{d}y}{\text{d}\tau} = -\varepsilon y/\left(1+\frac{k\Delta}{(ky+1)^2}\right) \qquad\qquad (1)$$

with $y(0)=y_0$ then we can solve it as such: \begin{align} -\varepsilon\tau + C_0 &= \int \frac {1+\frac{k\Delta}{\left(ky+1\right)^2}} {y} \ \text{d}y \\ %% &= \int \frac {1} {y} % + % \frac {k\Delta} {y\left(ky+1\right)^2} \ \text{d}y\\ %% &= \log{y} % + % \frac{\Delta}{k}\log{\left(\frac{y}{k+y}\right)} % + % \frac{\Delta}{k+y} \end{align}

with \begin{align} C_0 &= \log{y_0} % + % \frac{\Delta}{k}\log{\left(\frac{y_0}{k+y_0}\right)} % + % \frac{\Delta}{k+y_0} \end{align}

Therefore we can write: \begin{align} \tau= - \frac{1}{\varepsilon} \left( \log{y} % + % \frac{\Delta}{k}\log{\left(\frac{y}{k+y}\right)} % + % \frac{\Delta}{k+y} -C_0\right) \qquad\qquad (2) \end{align}

I have solved $(1)$ numerically, using an ODE solver in MATLAB, with the following parameters: $$\Delta=0.4351$$ $$\varepsilon=4.4261\times 10^{-5}$$ $$k=22.9806$$ $$y_0=0.5945$$ $$\tau\in [0,200000]$$

This is plotted by the black line in the following figure. I then solved $(2)$ for $\tau$ for $y\in[y_\text{min},y_0]$ where $y_\text{min}$ was the smallest value for y output from the numerical simulation. I then plotted this on the same figure, in dashed magenta. They don't match! I have checked this over and over, I do not know what I have done wrong here. Any help would be really appreciated.

enter image description here

$\endgroup$
  • 1
    $\begingroup$ How did you get $y + k$ terms from $ky +1$ terms? I have not gone through your calculations - maybe if you could update with the integrals you performed. $\endgroup$ – Chinny84 Mar 9 '17 at 14:51
  • $\begingroup$ @Chinny84: Shit. One second. $\endgroup$ – Freeman Mar 9 '17 at 14:56
  • $\begingroup$ @Chinny84: That fixed it. The integral is wrong. $\endgroup$ – Freeman Mar 9 '17 at 14:59
  • 1
    $\begingroup$ Been there and done it - good thing about getting old you have seen alot of short cuts for checking your result ;)! $\endgroup$ – Chinny84 Mar 9 '17 at 15:02
  • $\begingroup$ @Chinny84: You sound like my supervisor xD $\endgroup$ – Freeman Mar 9 '17 at 15:11
3
$\begingroup$

Well, as you said we can solve it:

$$\text{y}'\left(\tau\right)=-\frac{\epsilon\cdot\text{y}\left(\tau\right)}{1+\frac{\text{k}\cdot\Delta}{\left(1+\text{k}\cdot\text{y}\left(\tau\right)\right)^2}}\space\Longleftrightarrow\space\int\frac{\text{y}'\left(\tau\right)}{\frac{\text{y}\left(\tau\right)}{1+\frac{\text{k}\cdot\Delta}{\left(1+\text{k}\cdot\text{y}\left(\tau\right)\right)^2}}}\space\text{d}\tau=\int-\epsilon\space\text{d}\tau\tag1$$

Now, we get:

  • $$\int-\epsilon\space\text{d}\tau=-\epsilon\int1\space\text{d}\tau=\text{C}_1-\epsilon\cdot\tau\tag2$$
  • Substiute $\text{u}=\text{y}\left(\tau\right)$: $$\int\frac{\text{y}'\left(\tau\right)}{\frac{\text{y}\left(\tau\right)}{1+\frac{\text{k}\cdot\Delta}{\left(1+\text{k}\cdot\text{y}\left(\tau\right)\right)^2}}}\space\text{d}\tau=\int\frac{1}{\frac{\text{u}}{1+\frac{\text{k}\cdot\Delta}{\left(1+\text{k}\cdot\text{u}\right)^2}}}\space\text{d}\text{u}=\int\frac{1+\frac{\text{k}\cdot\Delta}{\left(1+\text{k}\cdot\text{u}\right)^2}}{\text{u}}\space\text{d}\text{u}=$$ $$\int\frac{1}{\text{u}}\space\text{d}\text{u}+\text{k}\cdot\Delta\int\frac{1}{\left(1+\text{k}\cdot\text{u}\right)^2}\cdot\frac{1}{\text{u}}\space\text{d}\text{u}\tag3$$
  • $$\int\frac{1}{\text{u}}\space\text{d}\text{u}=\ln\left|\text{u}\right|+\text{C}_2\tag4$$
  • $$\int\frac{1}{\left(1+\text{k}\cdot\text{u}\right)^2}\cdot\frac{1}{\text{u}}\space\text{d}\text{u}=\ln\left|-\text{k}\cdot\text{u}\right|-\ln\left|1+\text{k}\cdot\text{u}\right|+\frac{1}{1+\text{k}\cdot\text{u}}+\text{C}_3\tag5$$

So, we get:

$$\ln\left|\text{y}\left(\tau\right)\right|+\text{k}\cdot\Delta\cdot\left\{\ln\left|-\text{k}\cdot\text{y}\left(\tau\right)\right|-\ln\left|1+\text{k}\cdot\text{y}\left(\tau\right)\right|+\frac{1}{1+\text{k}\cdot\text{y}\left(\tau\right)}\right\}=\text{C}-\epsilon\cdot\tau\tag6$$

We can simplify a very little:

  • $$\left|-\text{k}\cdot\text{y}\left(\tau\right)\right|=\left|-\text{k}\right|\cdot\left|\text{y}\left(\tau\right)\right|=\left|\text{k}\right|\cdot\left|\text{y}\left(\tau\right)\right|\tag7$$
  • $$\ln\left|-\text{k}\cdot\text{y}\left(\tau\right)\right|-\ln\left|1+\text{k}\cdot\text{y}\left(\tau\right)\right|=\ln\left(\frac{\left|\text{k}\right|\cdot\left|\text{y}\left(\tau\right)\right|}{\left|1+\text{k}\cdot\text{y}\left(\tau\right)\right|}\right)\tag8$$

So, when we use the values:

$$\ln\left(0.5945\right)+9.99885906\ln\left(0.931796325795775\right)+0.6819589257422061=\text{C}\tag9$$

$\endgroup$
  • 1
    $\begingroup$ Thank you for helping! Very much appreciated, it's all sorted now! $\endgroup$ – Freeman Mar 13 '17 at 13:29

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.