# Construct a second order ODE given the solutions?

Tags:
1. Oct 10, 2015

1. The problem statement, all variables and given/known data
I've been stuck on this problem for three days now, and I have no clue how to solve it.

Construct a linear differential equation of order 2, for which {$y_1(x) = sin(x), y_2(x) = xsin(x)$} is a set of fundamental solutions on $I = (0,\pi)$.

2. Relevant equations
Wronskian for second order equations:
$W(y_1,y_2) = y_1 y_2' - y_2 y_1'$

$\dfrac{dW}{dx} + PW = 0$

3. The attempt at a solution
I checked with the Wronskian that this can be a fundamental set, since the Wronskian returns $sin^2(x)$ which is never 0 on the interval. Now I'm stuck trying to construct the equation. I tried basic stuff like $y'' + y = 0$ but all attempts were unsuccessful. I then tried using the identity $\dfrac{dW}{dx} + P(x)W = 0$, which yielded $P(x) = -cot(x)$. So I attempted $y'' - cot(x)y' = 0$ which also doesn't work. Is there a method for doing this or do I have to keep guessing?

2. Oct 10, 2015

### Staff: Mentor

If the set of fundamental solutions happened to be $\{e^x, xe^x\}$, I would be looking for a differential equation something like y'' - 2y' + y = 0, or $[D^2 - 2D + 1]y = 0$. Here the characteristic equation as a repeated root.

For your DE, I think this is a hint in the right direction. Also, because the DE is specifed to be of order 2, I'm pretty sure you should be looking at a nonhomogeneous DE.

3. Oct 10, 2015

Thanks for the response. I believe $y'' + y = 2cos(x)$ has the solution y = sin(x) + xsin(x) but would {sin(x),xsin(x)} be a fundamental set of solutions in that case?

4. Oct 10, 2015

### Staff: Mentor

I think this is where the problem intends you to go, but I'm not certain of it. A fundamental set for the DE you found would also include cos(x) and xcos(x). With suitable initial conditions the coefficients of cos(x) and xcos(x) would turn out to be zero. I'm not sure of the significance of the interval I that you're given.

5. Oct 11, 2015

### pasmith

The problem here is that if the ODE has constant real coefficients and $\sin x$ is a solution, then $\cos x$ also has to be a solution (because roots of the auxiliary equation are either real or a complex conjugate pair). For a second-order constant-coefficient real ODE you will not get $x \sin x$ as a solution since that implies a repeated pair of complex conjugate roots, which requires the ODE to be fourth order.

I don't think you're looking for a constant coefficient equation here.

The general solution you are looking for is $y(x) = (A + Bx)\sin x$. The second derivative of $A + Bx$ is zero, and $\sin x \neq 0$ on $(0,\pi)$. Does that suggest anything?

Last edited: Oct 11, 2015
6. Oct 11, 2015

Thank you very much for the reply. I was actually just coming to the conclusion that there would have to be variable coefficients. However I'm still stuck knowing that $y(x) = (A + Bx)sin(x)$. I don't understand how it is particularly helpful to know that the second derivative of $A + Bx$ is 0 because it is part of a product rule, so it doesn't really vanish. Would it have to be some sort of Cauchy-Euler Equation, like of the form $x^2y'' + axy' + by = 0$, which reduces to something with complex roots?

7. Oct 11, 2015

### LCKurtz

No. $\sin x$ isn't a solution of that DE. In fact, you can't even talk about a fundamental set of solutions for a nonhomogeneous linear DE. The sum of two solutions can never be a solution in that case. If $L(y_1)= f$ and $L(y_2) = f$ then $L(y_1+y_2) = L(y_1) + L(y_2) = f + f = 2f$.

8. Oct 12, 2015

### pasmith

Due to the restriction on the domain, $\sin x$ is not zero so you can divide both sides of the required general solution $y(x) = (A + Bx)\sin x$ by $\sin x$.

9. Oct 13, 2015

How does dividing by $\sin(x)$ help? That would leave me with $\dfrac{y(x)}{\sin(x)} = A + Bx$. How does this help me solve the equation? Thanks for the responses.

10. Oct 13, 2015

### LCKurtz

I also do not understand what pasmith is getting at with his hint. I think the question is poorly worded and there may be some confusion between the notion of "fundamental set" and "general solution". It is certainly true that the DE $y'' + y = 2\cos x$ has a solution $y=\sin x + x\sin x$. But it also has a general solution $y=A\sin x + B\cos x + x\sin x$. You could say $\{\sin x,\cos x\}$ is a fundamental set for the homogeneous equation and that $y=A\sin x + B\cos x + x\sin x$ is the general solution of the nonhomogeneous equation. Neither seems to be what the problem is asking.

11. Oct 14, 2015

### pasmith

Once you have $$\frac{y(x)}{\sin x} = Ax + B$$ you can simply differentiate twice and you will have a second-order linear ODE whose general solution is $Ax\sin x + B \sin x$!

That this is what the question-setter intended is strongly suggested by the explicit restriction of the domain to $(0,\pi)$, on which $\sin x > 0$.

12. Oct 14, 2015

### LCKurtz

Nice. And since the result is a homogeneous DE it does make sense to call $\{\sin x,x\sin x\}$ a fundamental set.