# Differential Equation Past Paper Question

a) Find the general solution to the differential equation: $$2\frac{d^{2}y}{dx^{2}}-4\frac{dy}{dx}+20y=0.$$ b) Find the general solution to the differential equation: $$x^{2}\frac{d^{2}y}{dx^{2}}+4x\frac{dy}{dx}+2y=\frac{1}{x}.$$

I am having trouble with these two differential equations in a past paper I am going through. Thanks in advance for any replies!

-
Part (a) at least is an absolutely standard 'just follow what's in the notes' question. What do your lecture notes say about such equations? Where do you get stuck when you follow the method you have learned? –  us2012 Aug 29 '12 at 20:32
For part (b), you can make this into a constant-coefficient equation with the change of independent variable $x = e^t$. –  Robert Israel Aug 29 '12 at 20:37
Alternatively, you can use Reduction of Order or Variation of Parameters after solving the homogeneous equation (which is an Euler differential equation). –  Robert Israel Aug 29 '12 at 20:39

I'll just try to expand on the comments.

These two equations are linear ODEs, the first one being homogeneous.

To solve the first one, guess the solution ofthe form $y = e^{ax}$ and solve for $a$. You should get two values of $a$, say $a_1$ and $a_2$, hence two solutions: $e^{a_1x}$ and $e^{a_2x}$. The theory of ODEs will tell you that for $x \in \mathbb R$, there are at most $2$ linearly independent solutions, so you know that $c_1 e^{a_1 x} + c_2 e^{a_2 x}$ is your complete solution. Well, you must know that $e^{a_1 x}$ and $e^{a_2 x}$ are linearly independent before making the last conclusion. This is always the case when $a_1 \ne a_2$ (which is true here).

To solve the second one, first solve its homogeneous version: $x^2 \frac{d^2 y}{dx^2} + 4x \frac{dy}{dx} + 2y = 0$. This can be solved by first guessing the form of solution $y = x^a$ and solving for $a$. (This is equivalent to setting $x = e^t$ in Robert's comment.) You'll get two values for $a$, say $a_1$ and $a_2$, hence two solutions $x^{a_1}$ and $x^{a_2}$. The theory of ODEs, again, tells you that for $x > 0$, $y = c_1 x^{a_1} + c_2 x^{a_2}$ is the complete solution to the homogeneous equation. To deal with the non-homogeneous term, use variation of parameters: Assume $y = u_1(x)x^{a_1} + u_2(x)x^{a_2}$. Solve the system

$$\begin{pmatrix} x^{a_1} & x^{a_2} \\ a_1 x^{a_1 - 1} & a_2 x^{a_2 - 1} \end{pmatrix} \begin{pmatrix} u_1'(x) \\ u_2'(x) \end{pmatrix} = \begin{pmatrix} 0 \\ 1/x^3 \end{pmatrix}$$ for $u_1'$ and $u_2'$, then integrate to get $u_1$ and $u_2$ (keep the two constants that appear). Substitute back into $y = u_1(x)x^{a_1} + u_2(x)x^{a_2}$ to get your final answer.

-
I fixed a typo in one of your equations; you might want to check the edit history to make sure I did it right. :) –  Micah Aug 29 '12 at 22:58
Thank you. My bad for being careless :) –  Tunococ Aug 29 '12 at 23:08
Thank you for the hints! For the first one I noticed that the auxiliary equation had complex roots, giving me the solution: y=e^(-1)(Acos3x + Bsin3x). Is that correct? –  Enrico S Sep 2 '12 at 13:49
I have not done the calculation, but at least you're supposed to have $x$ in your exponential function, like $y = e^{-x}(A\cos(3x) + B\sin(3x))$. –  Tunococ Sep 6 '12 at 5:08