How to solve multiple dependent differential equation?

204 Views Asked by At

I have next differential equation:

$$ (x_0x_3)'=-(x_1x_2)'+8\cdot(-x_2'-\dfrac{x_1'}{x_0}+\dfrac{x_1x_0'}{x_0^2})$$

where $x_0'=\dfrac{dx_0}{dz}$, and it means the same for every sign $'$.

On the other side $x_0=(1+64(1-z))^{0.5}=f(z)$.

I need to solve the first equation on that way that I need to find $x_3$. But because I have dependence $x_0=f(z)$, and because also $x_1=f(x_0)$ and $x_2=f(x_0)$, that means that they are all also dependent on $z$: $x_1=f(z)$ and $x_2=f(z)$, and it is impossible to integrate upper equation on this way:

$$\dfrac{d}{dz}(x_0x_3)=... \,\,\, / \cdot dz$$ $$d(x_0x_3)=... \,\,\, /integration$$ because I will lost some dependence between variables.

I am trying to do all this in Mupad which is part of Matlab and it is according to my opinion appropriate for symbolical equations. So I have tried to tell Mupad that I have $$x_0=(1+64(1-z))^{0.5}$$ $$x_1=8(\dfrac{1}{x_0}-1)$$ $$x_2=-\dfrac{x_1^2}{2x_0}+\dfrac{8}{x_0}(-x_1-ln(x_0))$$ and it accepted it. But as next step where I need to solve upper differential equation i tried with this:

ode::solve({-(x0*x3)'-(x1*x2)'+8*(-x2'-x1'/x0+x1*x0'/x0^2)=0},x3)

And also with different combinations with initial conditions

 ode::solve({-(x0*x3)'-(x1*x2)'+8*(-x2'-x1'/x0+x1*x0'/x0^2)=0,x3(0)=0},x3)

I always got:

Error: Invalid arguments 

Am I on the right way to solve this equation on this way and with Mupad and what would be incorrect here? Or would be correct way to solve this?

2

There are 2 best solutions below

2
On

You have $x_0=f(z)$ and $x_1=x_2=f(x_0)=f(f(z)),$ where $$f(z)=\sqrt{1+64(1-z)}.$$ Define $x_4=x_0\cdot x_3$. The original DE becomes \begin{align*} x_4'&=-(x_1x_2)'+8\cdot\left(-x_2'-\dfrac{x_1'}{x_0}+\dfrac{x_1x_0'}{x_0^2}\right) \\ x_4'&=-((x_1)^2)'+8\cdot\left(-x_1'-\dfrac{x_1'}{x_0}+\dfrac{x_1x_0'}{x_0^2}\right) \\ x_4'&=-((f(f(z)))^2)'+8\cdot\left(-(f(f(z)))'-\dfrac{(f(f(z)))'}{f(z)}+\dfrac{f(f(z))\,f'(z)}{f^2(z)}\right)\\ x_4'&=-2f(f(z))\cdot f'(f(z))\cdot f'(z)+8\cdot\left(\dfrac{-f^2(z)(f(f(z)))'-f(z)(f(f(z)))'+f(f(z))\,f'(z)}{f^2(z)}\right). \end{align*} We simplify what's in the parentheses: \begin{align*} ()&=\dfrac{-f^2(z)(f(f(z)))'-f(z)(f(f(z)))'+f(f(z))\,f'(z)}{f^2(z)}\\ &=\dfrac{-f^2(z)f'(f(z))f'(z)-f(z)f'(f(z))f'(z)+f(f(z))\,f'(z)}{f^2(z)} \\ &=f'(z)\cdot\dfrac{-f^2(z)f'(f(z))-f(z)f'(f(z))+f(f(z))}{f^2(z)}. \end{align*} Plugging this back in: $$x_4'=f'(z)\cdot\left(8\cdot\dfrac{-f^2(z)f'(f(z))-f(z)f'(f(z))+f(f(z))}{f^2(z)}-2f(f(z))\cdot f'(f(z))\right). $$ I would use Mathematica to define f[x_], and then simply integrate this expression with respect to $z$. That will give you $x_4$. Then you can solve for $x_3$.

5
On

Making substitutions and developing the DE gives

$$ x_3(z) x_0'(z)+\frac{8 x_1'(z)}{x_0(z)}+x_0(z) x_3'(z)+x_2(z) x_1'(z)+(x_1(z)+8) x_2'(z)-\frac{8x_1(z) x_0'(z)}{x_0(z)^2}=0 $$

Solving for $x_3(z)$ gives

$$ x_3'(z)= \frac{x_1(z) \left(8 x_0'(z)-x_0(z)^2 x_2'(z)\right)-x_0(z) \left(x_0(z) \left(x_3(z) x_0'(z)+x_2(z) x_1'(z)+8 x_2'(z)\right)+8 x_1'(z)\right)}{x_0(z)^3} $$

and solving the $x_3(z)$ DE

$$ x_3(z) = \frac{x_0(z) \left(C_3-(x_1(z)+8) x_2(z)\right)-8 x_1(z)}{x_0(z)^2} $$

All this was made with the help from a symbolic processor. I hope this helps.

Follows the MATHEMATICA script to obtain those results.

d[x1_, x2_, x3_, z_]:= D[x0[z] x3, z]+D[x1 x2, z]+8(D[x2, z]+D[x1, z]/x0[z]-x1 D[x0[z],z]/x0[z]^2) dx30 = d[x1[z], x2[z], x3[z], z] solx3 = Solve[dx30 == 0, x3'[z]][[1]] equx3 = solx3 /. Rule -> Equal solx3 = DSolve[equx3, x3, z][[1]] x3z = x3[z] /. solx3