0
$\begingroup$

Solve this differential equation: $$y'' - 7y' + 10y = \cos x$$ where $y$ is a one-variable function of x. What am I supposed to do with the $\cos x$?

  • 1
    Do you know how the solution space of inhomogeneous linear ODE is structured?2017-01-27
  • 0
    See Evegenys comment above and the [method of undetermined coefficients](https://en.wikipedia.org/wiki/Method_of_undetermined_coefficients#Typical_forms_of_the_particular_integral).2017-01-27

4 Answers 4

1

For the homogeneous part, I am sure that you do not face any problem.

Now, suppose that the solution is $$y=A \sin(x)+B\cos(x)$$ $$y'=A \cos(x)-B\sin(x)$$ $$y''=-A \sin(x)-B\cos(x)$$ and replace to get $$(9 A+7 B) \sin (x)+(9 B-7 A) \cos (x)=\cos(x)$$ Identify; this gives $$9A+7B=0$$ $$9B-7A=1$$ Solve for $A,B$.

Edit

Just to make the problem more general, consider the equation $$y''+ay'+by=c\sin(x)+d\cos(x)$$ and just do the same as above. You will end with $$-a B+A (b-1)-c=0$$ $$a A+(b-1) B-d=0$$

1

You can solve by means of complex numbers, generalizing to

$$y''-7y'+10y=e^{ix}.$$

As you know that the derivatives of the exponential are the same exponential times a coefficient, the solution must be of the form $ce^{ix}$. Then

$$(i^2-7i+10)ce^{ix}=e^{ix}$$ and

$$c=\frac1{9-7i}=\frac{9+7i}{130}.$$

Finally, the solution is the real part of $ce^{ix}$, or

$$\frac{9\cos x-7\sin x}{130}.$$

1

Let $z=y'-2y$. We have $$z'-5z=y''-2y'-5y'+10y=\cos x.$$

Now

$$\left(ze^{-5x}\right)'=(z'-5z)e^{-5x}$$ so that

$$\left(ze^{-5x}\right)'=e^{-5x}\cos x.$$ Then by integration

$$z=e^{5x}\int e^{-5x}\cos x\,dx.$$

Next, $y$ is similarly found from $y'-2y=z$, by means of (with a notational abuse)

$$y=e^{2x}\left(\int e^{3x}\left(\int e^{-5x}\cos x\,dx\right)\,dx\right).$$

If you include integration constants, this gives you the general homogeneous solution. Indeed,

$$y=e^{2x}\left(\int e^{3x}C\,dx\right)=e^{2x}(C'e^{3x}+C'')=C'e^{5x}+C''e^{2x}.$$

The particular non-homogenous solution is found by the double integration, left as an exercise (can be done using tables, by undeterminate coefficients, by complex numbers or by parts).


$$bI_c:=b\int e^{ax}\cos bx\,dx=e^{ax}\sin bx-a\int e^{ax}\sin bx\,dx=e^{ax}\sin bx-aI_s,\\ bI_s:=b\int e^{ax}\sin bx\,dx=-e^{ax}\cos bx+a\int e^{ax}\cos bx\,dx=e^{ax}\cos bx+aI_c,$$ solve for $I_c, I_s$.


$$\int e^{ax}(\cos bx+i \sin bx)dx=\int e^{(a+ib)x}dx=\frac1{a+ib}e^{(a+ib)x}=e^{ax}\frac{(a-ib)e^{ibx}}{a^2+b^2}\\ =e^{ax}\frac{a\cos bx+b\sin bx}{a^2+b^2}+ie^{ax}\frac{a\sin bx-b\cos bx}{a^2+b^2}.$$

0

If you are just looking for the solution then I think it is $y(x)=\exp{(2x)}c_{1}+\exp{(5x)}c_{2}+\frac{1}{130}(9\cos{(x)}-7\sin{(x)})$.