Since it is important to me I would like to award a user who would kindly explain me what are my mistakes and what is the correct way to solve the whole problem with 500 points.
I'd really like your help with understanding how to solve this Cauchy problem: $(t^2+1)(y''-2y+1)=e^t$ with the initial conditions: $y(0)=y'(0)=1$.
I see a lot of methods and I am completely confused about what are the steps for solving this equation. First I wrote $$(y''-2y+1)=\frac{e^t}{(t^2+1)}.$$
I read that I need to solve first the homogeneous equation $(y''-2y+1)=0$. Do I use Abel to reduce the order of the equation? I know that I need particular solution, so $y=0.5$ would do.
Now as far as I understand I need to use Wronskian determinant $$\begin{vmatrix} 0.5 &y \\ 0 &y' \end{vmatrix}=c\cdot e^{\int^t_0-(2)/1 ds}=c\cdot e^{-2t}=0.5y'$$
so $y'=2ce^{-2t}$, here I can use the data given me in the beginning so $c=0.5$ and $y'=e^{-2t}$ and $y=-0.5e^{-2t}+d$ and from the initial data again $d=1.5$ and $y=-0.5e^{-2t}+1.5$.
so now $y_h=-0.5e^{-2t}+1.5$ now I need to find $y_p=-0.5e^{-2t}u_1(t)+1.5u_2(t)$.
Then, I wrote the floowing :$$\begin{bmatrix} -0.5e^{-2t} &1.5 \\ e^{-2t}& 0 \end{bmatrix}\begin{pmatrix} u_1'\\ u_2' \end{pmatrix}=\begin{pmatrix} 0\\ \frac{e^t}{(t^2+1)} \end{pmatrix}.$$ By using this system, I found $u_1$ and $u_2$ and the final solution is $y_=y_h+y_p$.
Please tell me- am I right? Is this basically the way to do that? Was I allowed to divide the original solution with $(t^2+1)$ or should I had to solve $(t^2+1)(y''-2y+1)$ as a homogeneous equation?
Thank you!!
Separating the inhomogeneous part in the usual way we find $$\begin{equation*} y''-2y = \frac{e^t}{t^2+1} - 1.\tag{1} \end{equation*}$$ Notice that $y''-2y+1=0$ is not homogeneous.
The solution to (1) is $y = y_h + y_p$ where $y_h$ and $y_p$ are given below. Here is the solution in terms of the exponential integral. $\def\a{\sqrt{2}}$
Homogeneous solution
The homogeneous solutions to (1) are of the form $y = e^{r t}$. Plugging this into $y'' - 2 y = 0$ we find the characteristic equation $r^2 - 2 = 0$. The roots are $\pm \a$, so $y_h = A e^{\a t} + B e^{-\a t}$. Applying the boundary conditions we find $$\begin{eqnarray*} A+B &=& 1 \\ \a(A-B) &=& 1, \end{eqnarray*}$$ so $A = \frac{1}{4}(2+\a)$ and $B = \frac{1}{4}(2-\a)$. Therefore, $$\begin{eqnarray*} y_h &=& \frac{1}{4}(2+\a)e^{\a t} + \frac{1}{4}(2-\a)e^{-\a t} \\ &=& \cosh(\a t) + \frac{1}{\a} \sinh(\a t). \end{eqnarray*}$$
Particular solution
For convenience let $a=\a$ and $f(t) = \frac{e^t}{t^2+1} - 1$, so the differential equation takes the form $$\begin{equation*} y''-a^2y = f.\tag{2} \end{equation*}$$ There are many approaches to finding the particular solution to ODEs. A standard approach involves the direct use of Green's functions on (2). Let's try a different method.
Let $D = d/dt$. Then $(D^2-a^2)y = f$. Formally, $$\begin{eqnarray*} y &=& \frac{1}{D^2-a^2} f \\ &=& \frac{1}{(D+a)(D-a)} f \\ &=& \frac{1}{2a}\left(\frac{1}{D-a} - \frac{1}{D+a}\right)f, \end{eqnarray*}$$ where we have expanded in partial fractions. What is the meaning of $\frac{1}{D-a}f$? Of course it is the solution to the first order inhomogeneous ODE $$(D-a)u = f.$$ The solution to this equation can be found using the integrating factor technique, $$u(t) = e^{a t} \int_0^t ds\, e^{-a s} f(s).$$ The solution to $(D+a)v = f$ can be found similarly, $$v(t) = e^{-a t} \int_0^t ds\, e^{a s} f(s).$$ We choose the lower limits of integration so that $u(0) = v(0) = 0$. In fact we find $u'(0) = v'(0) = 0$ so the boundary conditions will not be disturbed when we add the particular solution to $y_h$.
The particular solution is then $$\begin{eqnarray*} y_p &=& \frac{1}{2a}(u-v) \\ &=& -\sinh^2\left(\frac{t}{\a}\right) +\frac{1}{2\a}\left( e^{\a t} \int_0^t ds\, \frac{e^{s(1-\a)}}{s^2+1} - e^{-\a t} \int_0^t ds\, \frac{e^{s(1+\a)}}{s^2+1} \right) \\ &=& -\sinh^2\left(\frac{t}{\a}\right) + \frac{1}{\a} \int_0^t ds\, \frac{e^s}{s^2+1} \sinh(\a(t-s)). \end{eqnarray*}$$ The integral can be written in terms of the exponential integral, as given in the link above, but that form is not particularly enlightening.
Addendum: Connection to the exponential integral. \begin{eqnarray*} \int_0^t ds\, \frac{e^{b s}}{s^2+1} &=& \int_0^t ds\, e^{b s} \frac{1}{2i}\left(\frac{1}{s-i} - \frac{1}{s+i}\right) \\ &=& \int_0^t ds\, e^{b s} \mathrm{Im}\, \frac{1}{s-i} \\ &=& \mathrm{Im}\,e^{i b} \int_{-i b}^{b(t-i)} dz\, \frac{e^{z}}{z} \hspace{10ex} (\textrm{let }z=b(s-i)) \\ &=& \mathrm{Im}\, e^{i b} \left[ \mathrm{Ei}(b(t-i)) - \mathrm{Ei}(-i b) \right] \end{eqnarray*}