# Toronto Math Forum

## MAT244-2018S => MAT244--Tests => Term Test 2 => Topic started by: Victor Ivrii on March 21, 2018, 02:54:56 PM

Title: TT2--P1
Post by: Victor Ivrii on March 21, 2018, 02:54:56 PM
a. Find general solution of
$$y''-y=\frac{4}{e^{2t}+1}.$$

b. Find solution, such that $y(0)=0$, $y'(0)=\pi$.
Title: Re: TT2--P1
Post by: Meng Wu on March 21, 2018, 03:06:17 PM
\underline{\text{Solution:}}$$\\ Part(a) \\ First consider homogeneous equation:$$y''-y=0$$characteristic equation:$$r^2-1=0 \implies \cases{r_1=1\\r_2=-1}$$Thus, the complementary solution$$y_c(t)=c_1e^t+c_2e^{-t}$$Now consider the nonhomogeneous equation$$y''-y={4\over e^{2t}+1}$$Since y_1(t)=e^t and y_2(t)=e^{-t}, Wronskain$$W=[y_1,y_2](t)=\begin{array}{|c c|}e^t &e^{-t}\\e^t&-e^{-t}\end{array}=e^t\cdot(-e^{-t})-e^{-t}\cdot e^t=-2 \neq0$$Therefore, y_1(t) and y_2(t) form a fundamental set of solutions.\\ Use the Method of Variation of Parameters: \\ The particular solution$$\begin{align}Y(t)&=-y_1(t)\int_{t_0}^{t}{y_2(s)g(s)\over W[y_1,y_2](s)}ds+y_2(t)\int_{t_0}^{t}{y_1(s)g(s)\over W[y_1,y_2](s)}ds\\&=-e^t\int_{t_0}^{t}{e^{-s}\cdot {4\over e^{2s}+1}\over -2}ds+e^{-t}\int_{t_0}^{t}{e^s \cdot {4\over e^{2s}+1}\over -2}ds\\&=2e^t\int_{t_0}^{t}{e^{-s}\over e^{2s}+1}ds-2e^{-t}\int_{t_0}^{t}{e^s\over e^{2s}+1}ds\end{align}$$For integral \int_{t_0}^{t}{e^{-s}\over e^{2s}+1}ds:\\ Let$$u=e^t \implies \cases{du=e^tdt \implies dt=e^{-t}du\\e^{-t}={1\over u}}$$Thus$$\begin{align}\int_{t_0}^{t}{e^{-s}\over e^{2s}+1}ds&=\int_{t_0}^{t}{e^{-s}\over e^{2s}+1}e^{-s}du\\&=\int_{t_0}^{t}{1\over u^2(u^2+1)}du\\&=\int_{t_0}^{t}({1\over u^2}-{1\over u^2+1})du\\&=\int_{t_0}^{t}{1\over u^2}du-\int_{t_0}^{t}{1\over u^2+1}du\\&=-{1\over u}-\arctan(u)\\&=-\arctan(e^t)-e^{-t}\end{align}$$For integral \int_{t_0}^{t}{e^s\over e^{2s}+1}ds:\\$$\int_{t_0}^{t}{e^s\over e^{2s}+1}ds=\arctan(e^t)$$Thus$$Y(t)=2e^t[-\arctan(e^t)-e^{-t}]-2e^{-t}[\arctan(e^t)]$$Therefore, the general solution$$\begin{align}y(t)&=y_c(t)+Y(t)\\&=c_1e^t+c_2e^{-t}+2e^t[-\arctan(e^t)-e^{-t}]-2e^{-t}[\arctan(e^t)]\end{align}$$Part(b)\\$$\begin{align}y(0)&=c_1e^0+c_2e^0+2e^0[-\arctan(e^0)-e^0]-2e^0[\arctan(e^0)]=0\\&=c_1+c_2+2(-{\pi\over4}-1)-2{\pi \over4}=0\end{align}\implies c_1+c_2=2+\pi$$Note$$y'(t)=c_1e^t-c_2e^{-t}-2e^t\arctan(e^t)-{2e^{2t}\over e^{2t}+1}+2e^{-t}\arctan(e^t)- {2\over e^{2t}+1}\begin{align}y'(0)&=c_1e^0-c_2e^0-2e^0 \arctan(e^0)-{2e^0\over e^0+1}+2e^0\arctan(e^0)-{2\over e^0+1}=0\\&=c_1-c_2-2{\pi\over4}-1+2{\pi\over 4}-1\end{align}\implies c_1-c_2=2$$Thus,$$\cases{c_1=2+{\pi \over 2}\\c_2=-{\pi\over2}}$$Therefore, general solution of the IVP is$$y(t)=(2+{\pi \over 2})e^t-{\pi\over2}e^{-t}-2(e^t+e^{-t})\arctan(e^t)-2$$Title: Re: TT2--P1 Post by: Meng Wu on March 21, 2018, 03:08:05 PM Don't know if my answer is correct or not. My brain was totally frozen for this question's integral during the test :( :-[ :-\ Title: Re: TT2--P1 Post by: Meng Wu on March 21, 2018, 03:18:38 PM I think (15) should be$$\implies c_1-c_2-2=\pi$$Therefore,$$\cases{c_1=2+\pi\\c_2=0}$(Maybe I'm wrong again :o) Title: Re: TT2--P1 Post by: Zihan Wan on March 22, 2018, 04:51:13 PM y(0)=0,y'(0)=pi but you are solving like y'(0)=0 Title: Re: TT2--P1 Post by: Victor Ivrii on March 24, 2018, 10:18:44 AM Indeed, the second attempt to (b) was correct$c_1=2+\pi,c_2=0\$