Sam K. answered 02/04/25
NYU graduate for math tutoring and writing help
\section{Problem and Approach}
We want to solve \begin{equation}y'' - 2y' + y = \frac{5e^t}{1+t^2}\end{equation} which is a second order linear non-homogeneous differential equation. To do this we can use the method of variation of parameters.
The main idea of this method is to assume that the general solution to (1) is related to its homogeneous version
\begin{equation}
y'' - 2y' + y = 0.
\end{equation}
We will call the solution to (2) $y_h(t)$ ($h$ for homogeneous).
More precisely, we will use the fact that the general solution to (1) - which we will call $y(t)$ - has the form $$y(t) = c_1y_1(t) + c_2y_2(t) + \psi(t)$$
where $y_1(t)$ and $y_2(t)$ are linearly independent solutions of (2) and $\psi(t)$ is a particular solution of (1). You can find the theorem which states this fact and its proof in Braun (1993) on page 151. I will assume you know how to solve equations like (2). So what we need to do is figure out a way to find $\psi(t)$ which we will assume is of the form $$\psi(t) = u_1(t)y_1(t) + u_2(t)y_2(t).$$
\section{Solving (2)}
Like I said, my assumption is that you know how to solve equations like (2). To solve (2) we simply assume the solution $y_h(t)$ has the form $$y(t) = e^{rt}.$$ Plugging this into (2) we get that $$r^2e^{rt} - 2re^{rt} + e^{rt} = 0$$ and simplifying we get that $$e^{rt}(r^2-2r+1)=0$$ so the characteristic equation is $$r^2 - 2r + 1 =0$$ which is a quadratic equation in $r$ with a repeated root of $$r=1.$$
Therefore the solution to (2) is $$y_h(t) = (C_1 + C_2t)e^t$$ where $C_1$ and $C_1$ are arbitrary constants which would be determined by initial conditions.
\section{Finding $\psi(t)$}
We have two linearly independent solutions of (2) namely $C_1e^t$ and $C_2te^t.$ Therefore we can let $y_1(t) = e^t$ and $y_2(t) = te^t.$ Thus $$\psi(t) = u_1(t)e^t + u_2(t) te^t.$$ We need a way to find $u_1$ and $u_2.$
\subsection{Finding $u_1$ and $u_2$}
To find $u_1$ and $u_2$ we will impose two conditions
\begin{equation}
u_1'(t)y_1(t) + u_2'(t)y_2(t) = 0
\end{equation}
and
\begin{equation}
u_1'(t)y_1'(t) + u_2'(t)y_2'(t) = \frac{5e^t}{1+t^2}
\end{equation}
which is a system of two equations and two unknowns.
In matrix form this is
$$
\begin{pmatrix}
y_1(t) & y_2(t)\\
y_1'(t) & y_2'(t)
\end{pmatrix}
\begin{pmatrix}
u_1'(t)\\
u_2'(t)
\end{pmatrix}
=
\begin{pmatrix}
0\\
\frac{5e^t}{1+t^2}
\end{pmatrix}
$$
where we want to find
$$
\begin{pmatrix}
u_1'(t)\\
u_2'(t)
\end{pmatrix}
$$
which we will then integrate to find $u_1(t)$ and $u_2(t).$
The solution can be written in terms of the Wronskian $W(t)$ as $$u_1'(t) = -\frac{y_2(t)g(t)}{W(t)}$$ and $$u_2'(t) = \frac{y_1(t)g(t)}{W(t)}$$ where $g(t)$ is simply the RHS of equation (1). Computing the Wronskian
$$W(t) = \begin{vmatrix}
e^t & te^t\\
e^t & (1+t)e^t
\end{vmatrix}
= e^{2t}.
$$
Therefore
$$u_1'(t) = -\frac{te^t \frac{5e^t}{1+t^2}}{e^{2t}} = -\frac{5t}{1+t^2}$$
and
$$u_2'(t) = \frac{e^t \frac{5e^t}{1+t^2}}{e^{2t}} = \frac{5}{1+t^2}$$
and so by integrating
$$u_1(t) = -5\int\frac{t}{1+t^2}dt = -\frac{5}{2}\ln(1+t^2)$$
and
$$u_2(t) = 5\int\frac{1}{1+t^2}dt = 5\arctan(t).$$
Thus putting this together using the form mentioned at the beginning of §3 we get $$\psi(t) = [-\frac{5}{2}\ln(1+t^2)]e^t + [5\arctan(t)]te^t.$$
\section{Putting Together to Solve (1)}
We can now put all this together using the form mentioned in the middle of §1 to get the general solution of (1) as
$$y(t) = (C_1 + C_2t)e^t - \frac{5}{2}e^t\ln(1+t^2) + 5te^t\arctan(t).$$
Sam K.
The answer is written in LaTex so to see it properly you should copy and paste it into something that can compile LaTex like Overleaf.02/04/25