Welcome to our community

Be a part of something great, join today!

Differential Equation challenge

Petrus

Well-known member
Feb 21, 2013
739
Hello MHB,
I wanted to post a challange question that is hopefully not really difficult, if the question is not understandable make sure to write it so I can try explain!:)


Calculate the Differential equation for
\(\displaystyle y''+2y'=0\)
that satisfy
\(\displaystyle \lim_{x->\infty}y(x)=1\) and \(\displaystyle y(0)=0\)

Regards,
\(\displaystyle |\pi\rangle\)
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
Re: Differential Equation challange

Hello Petrus,

One way to proceed is to recognize we are given a linear second order homogeneous ODE whose characteristic roots are:

\(\displaystyle r=0,-2\)

Hence, the general solution is:

\(\displaystyle y(x)=c_1+c_2e^{-2x}\)

We may now state:

\(\displaystyle \lim_{x\to\infty}y(x)=c_1=1\)

\(\displaystyle y(0)=1+c_2=0\,\therefore\,c_2=-1\)

Thus the solution satisfying the given conditions is:

\(\displaystyle y(x)=1-e^{-2x}\)
 

Petrus

Well-known member
Feb 21, 2013
739
Re: Differential Equation challange

Hello Petrus,

One way to proceed is to recognize we are given a linear second order homogeneous ODE whose characteristic roots are:

\(\displaystyle r=0,-2\)

Hence, the general solution is:

\(\displaystyle y(x)=c_1+c_2e^{-2x}\)

We may now state:

\(\displaystyle \lim_{x\to\infty}y(x)=c_1=1\)

\(\displaystyle y(0)=1+c_2=0\,\therefore\,c_2=-1\)

Thus the solution satisfying the given conditions is:

\(\displaystyle y(x)=1-e^{-2x}\)
Hello MarkFL,
Congrats that is the correct answer(Clapping)
Well you said "one way to proceed.." is there more way to solve this differential equation? Well this is the way I have learned yet:) The smart thing with start with the \(\displaystyle \lim_{x->\infty}y(x)=1\) is that \(\displaystyle \lim_{x->\infty}e^{-2x}=0\) so that \(\displaystyle c_2\) can be any real value and hence we are only left with \(\displaystyle c_1\) and thanks to that we can solve it with \(\displaystyle y(0)=0\) Thanks for taking your time and enter my challange!:)

Regards,
\(\displaystyle |\pi\rangle\)
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
Another way is to write the ODE as:

\(\displaystyle \frac{d}{dx}\left(\frac{dy}{dx} \right)=-2\frac{dy}{dx}\)

Integrate with respect to $x$ to obtain:

\(\displaystyle \frac{dy}{dx}=-2y+c_1\)

Separate variables:

\(\displaystyle \frac{1}{-2y+c_1}\,dy=dx\)

Integrate:

\(\displaystyle -\frac{1}{2}\ln|c_1-2y|=x+c_2\)

\(\displaystyle \ln|c_1-2y|=-2x+c_2\)

\(\displaystyle c_1-2y=c_2e^{-2x}\)

\(\displaystyle y(x)=c_1+c_2e^{-2x}\)

And now proceed as before...
 

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
Another way is to use the substitution \(\displaystyle t = y'\)

\(\displaystyle t'+2t=0\)

This differential equation is separable we can also multiply by the integrating factor .
 

Chris L T521

Well-known member
Staff member
Jan 26, 2012
995
Another method (which I think is the longest way; EDIT: Solving by Power Series about $x=0$ would be way more complicated and longer) would be to take Laplace Transforms of both sides to obtain:
\[\mathcal{L}\{y^{\prime\prime}\} + \mathcal{L}\{2y\} = \mathcal{L}\{0\} \implies s^2Y(s)-sy(0) - y^{\prime}(0) + 2sY(s)-2y(0)=0.\]
Note here we know nothing about $y^{\prime}(0)$, but let's not worry about that for the time being. Letting $y(0)=0$ and solving for $Y(s)$, we get
\[Y(s)=\frac{y^{\prime}(0)}{s^2+2s}=\frac{y^{\prime}(0)(s+2-s)}{2s(s+2)}=\frac{y^{\prime}(0)}{2}\left(\frac{1}{s}-\frac{1}{s+2}\right)\]
Taking the Inverse Laplace Transform of both sides gives us
\[y(x)=\mathcal{L}^{-1}\{Y(s)\} = \frac{y^{\prime}(0)}{2}\left(\mathcal{L}^{-1}\left\{\frac{1}{s}\right\} - \mathcal{L}^{-1}\left\{\frac{1}{s+2}\right\}\right) = \frac{y^{\prime}(0)}{2}(1-e^{-2x})\]
But we're told that $\displaystyle\lim_{x\to\infty}y(x)=1$, which implies that
\[\lim_{x\to\infty}y(x)= \lim_{x\to\infty}\frac{y^{\prime}(0)}{2} (1-e^{-2x})=\frac{y^{\prime}(0)}{2}=1\implies y^{\prime}(0)=2.\]
Therefore, the solution to our equation is $y(x)=1-e^{-2x}$.

(That was fun! XD)
 
Last edited:

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
Since \(\displaystyle y(x) \) is analytic around \(\displaystyle 0\) we can find the power series

Let \(\displaystyle y(x) = \sum_{n\geq 0} a_n x^n\)

\(\displaystyle y'(x) =\sum_{n\geq 1} n a_n x^{n-1} \)

\(\displaystyle y''(x) =\sum_{n\geq 2} n(n-1) a_n x^{n-2} \)

Hence we have the following

\(\displaystyle \sum_{n\geq 2} n(n-1) a_n x^{n-2} +2 \, \sum_{n\geq 1} n a_n x^{n-1}=0\)

\(\displaystyle \sum_{n\geq 2} n(n-1) a_n x^{n-2} +2 \, \sum_{n\geq 2} (n-1) a_{n-1} x^{n-2}=0\)

Hence we have the following

\(\displaystyle n(n-1)a_n+2(n-1) a_{n-1} =0\)


\(\displaystyle na_n+2a_{n-1}=0 \,\,\, \Rightarrow \,\,\, a_n = -\frac{2}{n} a_{n-1} \,\,\,\, , n\geq 2 \)

\(\displaystyle a_2 = -a_1\)

\(\displaystyle a_3 = \frac{2}{3}a_1\)

\(\displaystyle a_4 = -\frac{2^2}{3 \cdot 4} a_1\)

which suggests that

\(\displaystyle a_n = \frac{(-2)^{n-1}}{n!} a_1\)

we can easily deduce that \(\displaystyle a_0 = 0 \) using the initial condition .

\(\displaystyle y(x) = a_1\sum_{n\geq 1}\frac{(-2)^{n-1}}{(n)!} \, x^n = \frac{-a_1}{2}\, \sum_{n\geq 1}\frac{(-2)^{n}}{(n)!} \, x^n\)

\(\displaystyle y(x) = \frac{a_1}{-2} (e^{-2x}-1) \)

using \(\displaystyle y(\infty) = 1\) implies that \(\displaystyle a_1 = 2\)

\(\displaystyle y(x) = -(e^{-2x}-1) = 1-e^{-2x} \,\, \square \)

By the way I didn't see Chris's comment (Rofl)
 

Petrus

Well-known member
Feb 21, 2013
739
Hello,
I want to first thank you all for taking your time and enter the challange!:) When I did post this problem I only knew one method (which is the MarkFL post #2) and now you all show me more method! Remainds me one of the reason why I find math is such an intressting subject! I am Really gratefull!

Regards,
\(\displaystyle |\pi\rangle\)