# Variation of constants on a second order DE

Given is the DE $$\frac{d^2z}{dx^2}+z=\frac{\mu}{x^2}z$$ I have to prove that for $0<a\leqslant x$, $$z(x)=z(a)\cos(x-a)+z'(a)\sin(x-a) + \int_a^x \sin(x-\xi)\frac{\mu}{\xi^2}z(\xi) \, d\xi$$ I think it is a good idea to use variation of constants. So first I solved $\frac{d^2z}{dx^2}+z=0$, giving me $z(x)=c_1\sin(x)+c_2\cos(x)$, with $c_1, c_2$ constants. Then, I wrote $z(x)=u_1(x)\sin(x)+u_2(x)\cos(x)$ and calculated $z'(x)$ and $z''(x)$ accordingly. But here I got lost.

Can anybody help me?

• By using variation of constants you transformed a differential equation into an integral equation (observe that the unknown function appears under the integral sign). And the original DE has solution expressed in terms of Bessel functions. Mathematica gives $$c_1 \sqrt{x} \, J_{\frac{1}{2} \sqrt{4 \mu +1}}(x)+c_2 \sqrt{x} \,Y_{\frac{1}{2} \sqrt{4 \mu +1}}(x)$$ – user539887 Mar 31 '18 at 21:26
• Okay, but I still don't see how this would give me my $z(x)$... – David W. Mar 31 '18 at 22:22
• Sorry, I misunderstood you: thought you were interested in solving the equation rather than transforming it into an integral equation. Just take a formula for the variation of parameters for the nonhomogeneous equation $z''(x) + z(x) = f(x)$ (see, e.g. Variation of parameters exercise — harmonic motion) and substitute $\frac{\mu}{x^2} z(x)$ for $f(x)$. After some trig you should get the integral equation. – user539887 Apr 1 '18 at 6:35

$$z(x)=z(a)\cos(x-a)+z'(a)\sin(x-a) + \int_a^x \sin(x-\xi)\frac{\mu}{\xi^2}z(\xi) \, d\xi$$ $$z''(x)=-z(a)\cos(x-a)-z'(a)\sin(x-a) + \frac {\partial^2}{\partial x^2} \int_a^x \sin(x-\xi)\frac{\mu}{\xi^2}z(\xi) \, d\xi$$ Use Leibniz rule for the derivative of the integral... Then check if z is a solution of the equation.. $$\frac {\partial}{\partial x} \int_a^x \sin(x-\xi)\frac{\mu}{\xi^2}z(\xi) \, d\xi= \int_a^x \frac {\partial}{\partial x}\sin(x-\xi)\frac{\mu}{\xi^2}z(\xi) \, d\xi= \int_a^x \cos(x-\xi)\frac{\mu}{\xi^2}z(\xi) \, d\xi$$ $$\frac {\partial}{\partial x} \int_a^x \cos(x-\xi)\frac{\mu}{\xi^2}z(\xi) \, d\xi= -\int_a^x \sin(x-\xi)\frac{\mu}{\xi^2}z(\xi) \, d\xi+\frac{z(x)\mu}{x^2}$$ Therefore $$\frac {\partial^2}{\partial x^2} \int_a^x \sin(x-\xi)\frac{\mu}{\xi^2}z(\xi) \, d\xi=-\int_a^x \sin(x-\xi)\frac{\mu}{\xi^2}z(\xi) \, d\xi+\frac{z(x)\mu}{x^2}$$ The variation of constants is for differential equation with constants coefficients...Here you have a function of x.
• Okay, I see that this works. But this doesn't really explain how to get my $z(x)$. – David W. Apr 2 '18 at 19:27
• @DavidW. It shows that the formula for z is correct but as you said it dosent help you establish it...Use wronskian and the formula for particular solution to 2 order linear differential equation and consider whats on the right side of your equation as a function $f(x)$ and whats on the left side as a 2order linear equation with constant coefficients – Isham Apr 2 '18 at 19:37
Variation of constant does not work here, because the right hand side has a $z$ in it. In fact this is a homogeneous differential equation.$$\frac{d^2z}{dx^2}+z=\frac{\mu}{x^2}z \iff \frac{d^2z}{dx^2}+(1-\frac{\mu}{x^2})z=0$$