# Initial value problem using variation of parameter.

A second order DE is given: $$u'' +\lambda^2u=g(t,u) \space , u(0)=0,u'(0)=1$$ where $$\lambda>0$$ for all $$t\geq 0$$. The solution has to be verified which is:$$u(t)=\frac{\sin(\lambda t)}{\lambda}+\int_{0}^{t} \frac{\sin\lambda(t-s)}{\lambda}g(s,u(s))ds$$

My approach: I figured out the $$y_c=c_1\cos(\lambda t)+c_2\sin(\lambda t)$$ and $$y_p=-cos(\lambda t) \int_{0}^{t} \frac{\sin(\lambda s)}{\lambda}g(s,u(s))ds+\sin(\lambda t)\int_{0}^{t} \frac{\cos(\lambda s)}{\lambda}g(s,u(s))ds$$ I used variation of parameter for the $$y_p$$ . the general solution should be:

$$y=y_c+y_p$$ My questions are

1.If I plug in the initial conditions in only $$y_c$$ then I get $$c_1=0$$ and $$c_2 =1/\lambda$$ . Or should I have to plug in the initial conditions in the general one?

2 How to get rid of the $$\space\space\sin(\lambda t)\int_{0}^{t} \frac{\cos\lambda(t-s)}{\lambda}g(s,u(s))ds$$ part of the particular solution to get the desired solution ?

• thanks man. sorry for the typo – user1157 Nov 1 '18 at 17:40

Consider $$g_t(s)=λ\cos(λ(s-t))y(s)-\sin(λ(s-t))y'(s).$$ Its derivative is $$g_t'(s)=-\sin(λ(s-t))g(s,u(s))$$ and thus by the fundamental theorem of calculus $$λy(t)-[λ\cos(λt)y(0)+\sin(λt)y'(0)]=g_t(t)-g_t(0)=\int_0^tg_t'(s)\,ds =\int_0^t\sin(λ(t-s))g(s,u(s))\,ds.$$
• how did you get $g_t(s)$ ? . Understood the rest of your process. Can you tell me about the number 1 question that I asked. – user1157 Nov 2 '18 at 7:10
• The general solution of $y''+λ^2y=0$ is $y_t(s)=\sin(λ(s-t))$ and multiples. Now consider the Wronskian-like $g_t=y_t'u-y_tu'$ which has derivative $$g_t'=-λ^2y_tu-y_tu''=-y_tg(s,u).$$ The trick is as always the cancellation of the first derivative product terms. – Lutz Lehmann Nov 2 '18 at 8:46
• It is not exactly the complementary/homogeneous solution as the equation is not linear, the right side depends on $u$ and that may even be non-linearly. And Wronski-like determinants are often used in Sturm-Liouville-Picone theorems. If the simplified equation (here $y′′+λ^2y=0$) is non-autonomous, the method I used does not apply resp. reverts to the usual variation of constants. – Lutz Lehmann Nov 2 '18 at 10:11
• These are then the values of $c_1(0)$ and $c_2(0)$ if you compute the variations using definite integrals. Of course, changing these initial conditions modifies the complementary part of the solution, so it makes no difference if you compute the particular solution exactly so that it already satisfies initial conditions or take any anti-derivatives and first establish the general solution form and then fit its constants to the ICs. – Lutz Lehmann Nov 3 '18 at 10:45