# Thread: Non-Homogeneous Second grade diff. equation to solve

1. ## Non-Homogeneous Second grade diff. equation to solve

Hey all, i gonna share another problem to solve here we go:

Consider the equation

$y''+y=f(x)$

where

$y(0)=X_0 ; y'(0)=V_0$

prove that the solution is:

$y(x)=\int_{0}^{x}sin(x-s)f(s)ds + X_0cosx+V_0senx$

2. I just tried using Laplace transforms but i get a slightly different solution. Almost the same. What method did you use?

3. You are NOT asked to solve the equation. You are given a function and asked to show it is the solution.

If $y(x)= \int_0^x sin(s-x)f(s)ds+ X_0 cos(x)+ V_0 sin(x)$
what is y'(x)? what is y"(x)? What is y(0)? What is y'(0)?

You may want to use
$\frac{d }{dx}\int_{\alpha(x)}^{\beta(x)} F(x,t)dt= F(x, \beta(x))\frac{d\beta}{dx}- F(x,\alpha(x))\frac{d\alpha}{dx}+ \int_{\alpha(x)}^{\beta(x)}\frac{\partial F(x,t)}{\partial x} dt$

4. Originally Posted by whipflip15
I just tried using Laplace transforms but i get a slightly different solution. Almost the same. What method did you use?
characteristic equation of second grade ordinary diff eq. and then parameter variation method... that's the way i think is done

Originally Posted by HallsofIvy
You are NOT asked to solve the equation. You are given a function and asked to show it is the solution.

If $y(x)= \int_0^x sin(s-x)f(s)ds+ X_0 cos(x)+ V_0 sin(x)$
what is y'(x)? what is y"(x)? What is y(0)? What is y'(0)?

You may want to use
$\frac{d }{dx}\int_{\alpha(x)}^{\beta(x)} F(x,t)dt= F(x, \beta(x))\frac{d\beta}{dx}- F(x,\alpha(x))\frac{d\alpha}{dx}+ \int_{\alpha(x)}^{\beta(x)}\frac{\partial F(x,t)}{\partial x} dt$
that's cheating lol i know it'd work but u gotta get the solution by solving the diff eq... what if you didn't have the answer........

5. well i got the answer few days ago, been busy lately but for the record im gonna post the answer..as usual if im wrong correct me plz...

$y''+y=f(x)$

so i got the general solution

$y''+y=0$

so $m^2+1=0$
$m=\pm(i)$ remember that $i=\sqrt-1$

then the general solution is:

$y_g=c_1sen x + c_2cos x$

now i gotta get the particular solution which i got with parameters variation method...

so:

$y_p=v_1(x)sen x+ v_2(x)cos x$ where $v_1(x)$ and $v_2(x)$ are unknown but according to the formula:

$v'_1=\frac{{-y_2f(x)}}{{W(y_1,y_2)}}$ ; $v'_2=\frac{{y_1f(x)}}{{W(y_1,y_2)}}$

where $y_1=sen x ; y_2=cos x$

and $W=y_1y'_2-y_2y'_1=-(sen^2 x+cos^2 x)=-1$

then

$v'_1=\frac{{-cos xf(x)}}{{-1}}$

$v'_2=\frac{{y_1sen xf(x)}}{{-1}}$

so

$v_1=\int f(x)cos x dx$

$v_2=-\int f(x)sen x dx$

and the particular solution is:

$y_p=sen x\int f(x)cos x dx-cos x\int f(x)sen x dx$

$y_p=\int_{0}^{s} cos sf(s)sen x ds-\int_{0}^{s} cos xf(s)sen s ds$

$y_p=\int_{0}^{s} (cos ssen x ds-cos xsen s)f(s) ds$

and finally

$y_p=\int_{0}^{s} sen (x-s)f(s) ds$

now the initial values:

$y(0)=X_0 ; y'(0)=V_0$

$y(0)=c_1sen(0)+c_2cos(0)=X_0$ so $c_2=X_0$

$y'(0)=c_1cos(0)-c_2sen(0)=V_0$ so $c_1=V_0$

then the solution for the initial values is:

$y(x)=\int_{0}^{s} (cos ssen x ds-cos xsen s)f(s) ds + X_0cos x + V_0 sen x$