Solve $y''-2y'-3y=3te^{-t}$

Attempt: now the solution has two parts. Namely, $y=y_h+y_p$ where $y_h$ is the solution of the homogeneous equation and $y_p$ is the solution of the nonhomogeneous equation. $y_h$ is easy to find.


I am struggling with finding $y_p$. The way I set it up is:


Since $Be^{-t}$ is also a solution for $y_h$ I multiply RHS of $y_p$ by $t$ and get:


Then, I find derivatives of $y_p$ and plug them into differential equation, simplify, and get:


Now, if this is correct how would I solve for A and B?

It is not homework. Thank you for your help.

  • 1
    $\begingroup$ If that's correct, there is no solution as you can't have $-2A=0$ and $-4A=-3$. But I don't think it's correct. However you do it, it's very messy. $\endgroup$ – Mike Feb 21 '13 at 23:12
  • $\begingroup$ Agreeing with @Mike. You must have made a mistake in differentiating $y_p$ or in algebra, as the method is correct. $\endgroup$ – Gerry Myerson Feb 21 '13 at 23:21
  • $\begingroup$ If you know how to use integrating factors, you can solve the equation directly. Try the substituion $z=y'+y$. $\endgroup$ – Mike Feb 21 '13 at 23:37



For $y''-2y'-3y=3te^{-t}$, we get:

$$(2 A - 4B - 8At)e^{-t} = 3t e^{-t}$$

So, equating sides, we get: $$-8A = 3 \rightarrow A = -\frac{3}{8}$$

and we have:

$$2A - 4B = 0 \rightarrow B = \frac{1}{2} A \rightarrow B = -\frac{3}{16}$$

This agrees with WA


  • $\begingroup$ Very good answer. Thanks. $\endgroup$ – Koba Feb 22 '13 at 5:06
  • $\begingroup$ @Dostre: You are very welcome. $\endgroup$ – Amzoti Feb 22 '13 at 5:31
  • 1
    $\begingroup$ Great answer = +1, nice feedback $+ \to \infty$ $\endgroup$ – amWhy May 1 '13 at 0:58
  • $\begingroup$ @amWhy: Thanks, I like when things are that clear, although it does not always happen! :-) $\endgroup$ – Amzoti May 1 '13 at 0:59
  • $\begingroup$ @amWhy it should not be $+\color{red}1\to\infty$? $\ddot\smile$. $\endgroup$ – manooooh Jan 15 '19 at 0:37

You definitely made a mistake, that's what Mathematica shows

In[27]:= ClearAll[A, B]
y = (A*t^2 + B*t)*E^-t;
y' = D[y, t];
y'' = D[y', t];
S = Simplify[y'' - 2 y' - 3 y];

In[64]:= S

Out[64]= E^-t (-4 B + A (2 - 8 t))

In[65]:= sol = Solve[-4 q + 2 p == 0 && -8 p == 3, {p, q}];

In[63]:= Simplify[S /. {A -> p /. sol[[1]], B -> q /. sol[[1]]}]

Out[63]= 3 E^-t t

You are on the right track as far as a guess for $y_p$; something went wrong with your algebra. If we guess that $y_p = (b+c t)e^{-t}$, then plugging this into the diff eq'n gives us, after much simplification:

$$(-4 b+2 c -8 c t) e^{-t}$$

Equating this with your RHS gives $c=-3/8$ and $b=-3/16$. Plugging this specific form back into the equation produces $3 t e^{-t}$, as expected.


For getting the particular solution of this inhomogeneous equation, you guess an expression for it with two undetermined coefficients A and B, however you may neglect some conditions. There is a systematic method to cope with those kinds of inhomogenous equation, which the general solutions of its associated homogeneous equations are known.

As you posted it: the associated general solutions of its homogeneous equations are: $$y_h=c_1e^{3t}+c_2e^{−t}$$

now supposing the particular solutions is of the form: $$y_p=v_1(t)e^{3t} + v_2(t)e^{-t} $$

The Wronskian of this homogeneous equ. is: $$W=\begin{vmatrix} e^{3t} & e^{-t} \\ (e^{3t})' & (e^{-t})' \end{vmatrix}=-4e^{2t}$$

denote the inhomogeneous term as $Q(t)$: $3te^{-t}=Q(t)$

the systematic method states that :(note the integral constants are not important.) $$ v_1(t) = \int \frac{-y_2(t)Q(t)}{W} \mathrm{d}t =-\frac{3}{64}e^{-4t}(4t+1) \\ v_2(t)=\int \frac{y_1(t)Q(t)}{W} \mathrm{d}t = -\frac{3}{8}t^2$$

Therefore one of the particular solutions is : $$y_p=-\frac{3}{64}e^{-t}(8t^2+4t+1)$$

  • $\begingroup$ This systematic method is called The Method of Variation of Parameters. $\endgroup$ – Zoe Rowa Feb 22 '13 at 4:12
  • $\begingroup$ More, for those kinds of inhomogeneous equation which inhomogeneous term is $P_n(t)e^{at}$, you should guess the particular solution is of the form :$\hat{P}_{n+1}(t)e^{-t}$, $P_n(t),\hat{P}_{n+1}$ is a polynomial of order n or n+1. $\endgroup$ – Zoe Rowa Feb 22 '13 at 4:16
  • $\begingroup$ I have not learned the method of variation of parameters but thank you for introduction. $\endgroup$ – Koba Feb 22 '13 at 5:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.