# Tough Differential equation

Can anyone help me solve this question ?

$$\large{y^{\prime \prime} + y = \tan{t} + e^{3t} -1}$$ I have gotten to a part when I know $r = \pm 1$ and then plugging them into a simple differential equation. I do not know how to the next step.

Thank you very much for all your help.

• Can you show how did you get to the part where $r =\pm 1$ – alkabary May 19 '15 at 7:34
• y'' + y = 0 The initial step. since r^2 + 1 = 0 --> r = ±1i. – PacMan May 19 '15 at 7:36
• There is an entirely automatized approach to solve these differential equations. Was it not explained to you? – Did May 19 '15 at 7:45
• I'm suppose to use method of coefficient. But i'm not too sure how to approach it after i got yc. since General solution is y = yc + yp. Im not too sure how to find yp in the certain question. – PacMan May 19 '15 at 7:48
• Oh, so you were given a systematic method but you ask the question here to avoid applying the method yourself? Since the exercise is meant to make you apply the method, this seems like a pretty sure way to avoid learning the subject (and, ultimately, a sure way to fail the exam, if an exam is approaching). Maths is not a spectator's sport, one can only learn it by doing things oneself. – Did May 19 '15 at 8:20

Find the complementary solution by solving \begin{equation*} y''+y=0. \end{equation*} Substitute $y=e^{\lambda t}$ to get \begin{equation*} (\lambda ^2+1)e^{\lambda t}=0. \end{equation*} Therefore the zeros are $\lambda=i$ or $\lambda =-i.$ The general solution is given by \begin{equation*} y=y_1+y_2=c_1e^{it}+\frac{c_2}{e^{it}}. \end{equation*} Apply Euler's identity and regroup the terms to get \begin{equation*} y=(c_1+c_2)\cos(t)+i(c_1-c_2)\sin(t) \\ =c_3\cos(t)+c_2\sin(t). \end{equation*} For the particular solution, try $y_{b_1}=\cos(t)$ and $y_{b_2}=\sin(t).$ Calculating the Wronskian $W$ gives $1$. Let $f(t)$ be RHS of the differential equation. Use the two formulae \begin{equation*} v_1=-\int \frac{f(t)y_{b_2}}{W},~v_2=\int \frac{f(t)y_{b_1}}{W} \end{equation*} to get the particular solution \begin{equation*} y_p=v_1y_{b_1}+v_2y_{b_2}. \end{equation*}