# Thread: Differential equation solver

1. ## Differential equation solver

Hello,
How to solve $4*x^2*y" +12*x*y' +3*y=0, y(4)=\frac18, y'(4)=\frac{-3}{64}$ with the help of Droid48 calculator application? It involves stiff initial value problem as well as vector-value differential equation.

2. ## Re: Differential equation solver Originally Posted by Vinod Hello,
How to solve $4*x^2*y" +12*x*y' +3*y=0, y(4)=\frac18, y'(4)=\frac{-3}{64}$ with the help of Droid48 calculator application? It involves stiff initial value problem as well as vector-value differential equation.
Try for a solution of the form $y=x^r$ and see what values of $r$ work. You shouldn't need a calculator for this.

3. ## Re: Differential equation solver

The Wronskian is going to be $Ce^{-\displaystyle \int \dfrac{3}{x}dx} = Ce^{-3\ln x} = e^{\ln x^{-3k}} = x^{-3k}$ for some constant $k$. So, as Walagaster says, the solution will be $x^r$ for some $r$.

4. ## Re: Differential equation solver Originally Posted by SlipEternal The Wronskian is going to be $Ce^{-\displaystyle \int \dfrac{3}{x}dx} = Ce^{-3\ln x} = e^{\ln x^{-3k}} = x^{-3k}$ for some constant $k$. So, as Walagaster says, the solution will be $x^r$ for some $r$.
Hello,
How to compute wronskian? How it can be utilised to solve differential equations? Would you give me some more information of Wronskian. As far as i know it is a determinant that is related to linear independence of a set of differential equations.

5. ## Re: Differential equation solver Originally Posted by SlipEternal The Wronskian is going to be $Ce^{-\displaystyle \int \dfrac{3}{x}dx} = Ce^{-3\ln x} = e^{\ln x^{-3k}} = x^{-3k}$ for some constant $k$. So, as Walagaster says, the solution will be $x^r$ for some $r$.
Hello, So applying initial conditions $y=x^{-\frac32}$

6. ## Re: Differential equation solver Originally Posted by Vinod Hello, So applying initial conditions $y=x^{-\frac32}$
So, after 6 months and no . or ? after your quote, are you asking us or telling us? Do you have a question for us? Or are you hoping someone will check your work (which you didn't show) for you?

7. ## Re: Differential equation solver

$$4x^2y''+12xy'+3y =0 \quad y(4)=\tfrac18, \, y'(4) = -\tfrac3{64}$$
\begin{align}
&\text{Let} & x &= e^t \\ &&\implies \tfrac{\mathrm dx}{\mathrm dt} &= e^t = x \\[8pt]
&\text{and} & y(t) &= y\big(x(t)\big) \\
&& \tfrac{\mathrm dy}{\mathrm dt} &= \tfrac{\mathrm dy}{\mathrm dx} \tfrac{\mathrm dx}{\mathrm dt} = x\tfrac{\mathrm dy}{\mathrm dx} &\implies \dot y &= xy' \\
&& \tfrac{\mathrm d^2y}{\mathrm dt^2} &= \tfrac{\mathrm dy}{\mathrm dx} \tfrac{\mathrm dx}{\mathrm dt} + x\tfrac{\mathrm d^2y}{\mathrm dx^2} \tfrac{\mathrm dx}{\mathrm dt} \\ &&&= x^2 \tfrac{\mathrm d^2y}{\mathrm dx^2} + x\tfrac{\mathrm dy}{\mathrm dx} &\implies \ddot y &= x^2y'' + xy' \end{align}
And so
\begin{align} 4x^2y''+12xy'+3y &= 4(x^2y''+ xy') + 8xy'+3y \\ &= 4\ddot y + 8\dot y + 3y = 0 \end{align}
The characteristic equation \begin{align} 4r^2 + 8r + 3 &= (2r)^2 + 4(2r) + 3 \\ &= (2r+1)(2r+3) = 0 \end{align}
Has roots \begin{equation}r_1 = -\tfrac12 \quad \text{and} \quad r_2 = -\tfrac32\end{equation}
so \begin{align}y(t) &= c_1 e^{-\frac12 t} + c_2 e^{-\frac32 t} \\ &= c_1 (e^{t})^{-\frac12} + c_2 (e^t)^{-\frac32} \\ y(x) &= c_1 x^{-\frac12} + c_2x^{-\frac32 } \\ &= \frac{c_1}{\sqrt x} + \frac{c_2}{\sqrt{x^3}}\end{align}
And plug in the initial conditions to find the constants.

8. ## Re: Differential equation solver Originally Posted by Archie $$4x^2y''+12xy'+3y =0 \quad y(4)=\tfrac18, \, y'(4) = -\tfrac3{64}$$
\begin{align}
&\text{Let} & x &= e^t \\ &&\implies \tfrac{\mathrm dx}{\mathrm dt} &= e^t = x \\[8pt]
&\text{and} & y(t) &= y\big(x(t)\big) \\
&& \tfrac{\mathrm dy}{\mathrm dt} &= \tfrac{\mathrm dy}{\mathrm dx} \tfrac{\mathrm dx}{\mathrm dt} = x\tfrac{\mathrm dy}{\mathrm dx} &\implies \dot y &= xy' \\
&& \tfrac{\mathrm d^2y}{\mathrm dt^2} &= \tfrac{\mathrm dy}{\mathrm dx} \tfrac{\mathrm dx}{\mathrm dt} + x\tfrac{\mathrm d^2y}{\mathrm dx^2} \tfrac{\mathrm dx}{\mathrm dt} \\ &&&= x^2 \tfrac{\mathrm d^2y}{\mathrm dx^2} + x\tfrac{\mathrm dy}{\mathrm dx} &\implies \ddot y &= x^2y'' + xy' \end{align}
And so
\begin{align} 4x^2y''+12xy'+3y &= 4(x^2y''+ xy') + 8xy'+3y \\ &= 4\ddot y + 8\dot y + 3y = 0 \end{align}
The characteristic equation \begin{align} 4r^2 + 8r + 3 &= (2r)^2 + 4(2r) + 3 \\ &= (2r+1)(2r+3) = 0 \end{align}
Has roots \begin{equation}r_1 = -\tfrac12 \quad \text{and} \quad r_2 = -\tfrac32\end{equation}
so \begin{align}y(t) &= c_1 e^{-\frac12 t} + c_2 e^{-\frac32 t} \\ &= c_1 (e^{t})^{-\frac12} + c_2 (e^t)^{-\frac32} \\ y(x) &= c_1 x^{-\frac12} + c_2x^{-\frac32 } \\ &= \frac{c_1}{\sqrt x} + \frac{c_2}{\sqrt{x^3}}\end{align}
And plug in the initial conditions to find the constants.
Hello,
Your method of solving is different than mentioned in my PDF.

9. ## Re: Differential equation solver Originally Posted by Vinod Hello,
Your method of solving is different than mentioned in my PDF.
Typically there is more than one way to solve a differential equation, though Archie's method is "standard." Can you show us what your pdf 's method looks like? Once we know that we can walk you through any difficulties you are having with it.

-Dan

10. ## Re: Differential equation solver Originally Posted by Vinod Hello,
Your method of solving is different than mentioned in my PDF.
\begin{align}
&\text{Let} & t &= \ln x \\ &&\implies \tfrac{\mathrm dt}{\mathrm dx}&= \tfrac1x \\[8pt]
&\text{and} & y(x) &= y\big(t(x)\big) \\
&& \tfrac{\mathrm dy}{\mathrm dx} &= \tfrac{\mathrm dy}{\mathrm dt} \tfrac{\mathrm dt}{\mathrm dx} = \tfrac1x\dot y &\implies xy' &= \dot y \\
&& \tfrac{\mathrm d^2y}{\mathrm dx^2} &= -\tfrac1{x^2}\tfrac{\mathrm dy}{\mathrm dt} + \tfrac1{x}(\tfrac{\mathrm d^2y}{\mathrm dt^2}\tfrac{\mathrm dt}{\mathrm dx}) \\ &&&= \tfrac1{x^2}\ddot y - \tfrac1{x^2}\dot y &\implies
x^2y'' &= \ddot y - \dot y\end{align}
And so
\begin{align} 4x^2y''+12xy'+3y &= 4(\ddot y - \dot y) + 12\dot y + 3y \\ &= 4\ddot y + 8\dot y + 3y = 0 \end{align}
And continue as before.

11. ## Re: Differential equation solver

The substitutions $x=e^t$ and $t = \ln x$ are the same, one going one way and one the other. Both are significantly more complicated than just trying $y = x^r$ in the first place, which is the method I would regard as "standard" for an Euler equation.

12. ## Re: Differential equation solver Originally Posted by Walagaster The substitutions $x=e^t$ and $t = \ln x$ are the same, one going one way and one the other. Both are significantly more complicated than just trying $y = x^r$ in the first place, which is the method I would regard as "standard" for an Euler equation.
They are the same, yes. But for me, each is better in parts than the other. They are more complicated than trying $y=x^r$, but that doesn't really help you if the roots of the characteristic equation are not real - unless you were taught the derivation of the real solution (see below). In the case that you have a repeated root, you also need to use the method of reduction of order to get the second solution.

The simplest approach is probably to ask Wolfram Alpha or look for a formula on Wikipedia, but I wouldn't recommend either of those as they tell you nothing about what's actually going on in the equation.

With solutions $$y_1 = x^{u+iv} \qquad y_2 = x^{u-iv}$$
We have \begin{align}
y &= c_1 x^{u+iv} + c_2 x^{u-iv} \\
&= c_1 x^u x^{iv} + c_2 x^u x^{-iv} \\
&= x^u(c_1 x^{iv} + c_2 x^{-iv}) \\
&= x^u(c_1 e^{iv \ln x} + c_2 e^{-iv \ln x}) \\
&= \tfrac12x^u\big((c_1 + c_2) (e^{iv \ln x} + e^{-iv \ln x}) + (c_1 - c_2)(e^{iv \ln x} - e^{-iv \ln x})\big) \\
&= x^u\big(\tfrac{c_1 + c_2}2 \cos{(v \ln x)} + \tfrac{c_1 - c_2}2(\sin{(v \ln x)} \big) \\
&= x^u\big(c_3 \cos{(v \ln x)} + c_4(\sin{(v \ln x)} \big) \end{align}
Not tremendously difficult, but not often taught in my experience.

13. ## Re: Differential equation solver Originally Posted by Archie They are the same, yes. But for me, each is better in parts than the other. They are more complicated than trying $y=x^r$, but that doesn't really help you if the roots of the characteristic equation are not real - unless you were taught the derivation of the real solution (see below). In the case that you have a repeated root, you also need to use the method of reduction of order to get the second solution.

The simplest approach is probably to ask Wolfram Alpha or look for a formula on Wikipedia, but I wouldn't recommend either of those as they tell you nothing about what's actually going on in the equation.

With solutions $$y_1 = x^{u+iv} \qquad y_2 = x^{u-iv}$$
We have \begin{align}
y &= c_1 x^{u+iv} + c_2 x^{u-iv} \\
&= c_1 x^u x^{iv} + c_2 x^u x^{-iv} \\
&= x^u(c_1 x^{iv} + c_2 x^{-iv}) \\
&= x^u(c_1 e^{iv \ln x} + c_2 e^{-iv \ln x}) \\
&= \tfrac12x^u\big((c_1 + c_2) (e^{iv \ln x} + e^{-iv \ln x}) + (c_1 - c_2)(e^{iv \ln x} - e^{-iv \ln x})\big) \\
&= x^u\big(\tfrac{c_1 + c_2}2 \cos{(v \ln x)} + \tfrac{c_1 - c_2}2(\sin{(v \ln x)} \big) \\
&= x^u\big(c_3 \cos{(v \ln x)} + c_4(\sin{(v \ln x)} \big) \end{align}
Not tremendously difficult, but not often taught in my experience.
Hello,

But $\sin{\theta}=\frac{1}{2i}(e^{i\theta}-e^{-i\theta})$? and your secondlast step does not contain i in the denominator. It is only$\frac{c_1-c_2}{2}$. How is that?

14. ## Re: Differential equation solver

Oops! I thought it came out a bit easy! I need to sort it out.

Essentially, the real solutions are when $c_1$ and $c_2$ are conjugate pairs, and in this case $c_1 - c_2$ is purely imaginary, so the $i$ cancels. There's also an odd factor of $\tfrac12$ lying around, but that doesn't matter so much.

15. ## Re: Differential equation solver

Something like

With solutions $$\DeclareMathOperator{\im}{Im} \DeclareMathOperator{\re}{Re} y_1 = x^{u+iv} \qquad y_2 = x^{u-iv}$$
We have \begin{align}
y &= c_1 x^{u+iv} + c_2 x^{u-iv} \\
&= c_1 x^u x^{iv} + c_2 x^u x^{-iv} \\
&= x^u(c_1 x^{iv} + c_2 x^{-iv}) \\
&= x^u(c_1 e^{iv \ln x} + c_2 e^{-iv \ln x}) \\
&= x^u\big((c_1 + c_2) \tfrac12(e^{iv \ln x} + e^{-iv \ln x}) + (c_1 - c_2)\tfrac{i}{2i}(e^{iv \ln x} - e^{-iv \ln x})\big) \\
&= x^u\big((c_1 + c_2)\cos{(v \ln x)} + (c_1 - c_2)i\sin{(v \ln x)} \big)\end{align}
For this expression to be real, we require that $\im{(c_1+c_2)} = 0$ and $\re{(c_1-c_2)} = 0$. This means that we must choose $c_1 = \overline{c_2}$. This also leads to the two coefficients being independent, so we may write.
$$y = x^u\big(c_3\cos{(v \ln x)} + c_4\sin{(v \ln x)} \big) \qquad (c_3,c_4) \in \mathbb R^2$$