# Solve this differential equation: NSK PSKy''-7y'+10y=\cos xZSK NSK where y is a one-variable function

Solve this differential equation:
$y{}^{″}-7{y}^{\prime }+10y=\mathrm{cos}x$
where y is a one-variable function x. What am I supposed to do with the cosx?
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Ethan Sanders
You can solve by means of complex numbers, generalizing to
As you know that the derivatives of the exponential are the same exponential times a coefficient, the solution must be of the form $c{e}^{ix}$. Then
$\left({i}^{2}-7i+10\right)c{e}^{ix}={e}^{ix}$
and $c=\frac{1}{9-7i}=\frac{9+7i}{130}$
Finally, the solution is the real part of $c{e}^{ix}$, or
$\frac{9\mathrm{cos}x-7\mathrm{sin}x}{130}$
###### Not exactly what you’re looking for?
redhotdevil13l3
For the homogeneous part, I am sure that you do not face any problem.
Now, suppose that the solution is
$y=A\mathrm{sin}\left(x\right)+B\mathrm{cos}\left(x\right)$
${y}^{\prime }=A\mathrm{cos}\left(x\right)-B\mathrm{sin}\left(x\right)$
$y{}^{″}=-A\mathrm{sin}\left(x\right)-B\mathrm{cos}\left(x\right)$
and replace to get
$\left(9A+7B\right)\mathrm{sin}\left(x\right)+\left(9B-7A\right)\mathrm{cos}\left(x\right)=\mathrm{cos}\left(x\right)$
Identify; this gives
$9A+7B=0$
$9B-7A=1$
Solve for A,B.
Just to make the problem more general, consider the equation
$y{}^{″}+a{y}^{\prime }+by=c\mathrm{sin}\left(x\right)+d\mathrm{cos}\left(x\right)$
and just do the same as above. You will end with
$-aB+A\left(b-1\right)-c=0$
$aA+\left(b-1\right)B-d=0$