Differential equation (with Laplace transform)

74 Views Asked by At

Here is the text of the problem:

(Solve the following initial value problem.) $$y' + 2y + 10\int_{0}^{t}y(\tau)\,d\tau = 255[1 - u(t - \pi)]\sin t, \quad y(0) = 0.$$

I tried to use Laplace which seems the best method to use and this is what I did:

$$sY(s) - y(0) + 2Y(s) + 10Y(s)/s = 255\frac{1+e^{-\pi s}}{s^2+1}$$

I can reorder a bit left but then I'm stuck here:

$$Y(s)(s+2+10/2) = 255\frac{1+e^{-\pi s}}{s^2+1}$$

How can I go on from here?

1

There are 1 best solutions below

1
On BEST ANSWER

I think there's two ways to approach this problem. The first is in the vein of my suggestion to first differentiate in order to get a simpler ODE. For now, though, I'll instead focus the Laplace-transform method for the original ODE as presented by the OP.

First, as I noted in comments, it suffices to take the inverse Laplace transform of $$G(s)=\frac{255}{s+2+10/s}\frac{1}{s^2+1}=\frac{255s}{(s^2+2s+10)(s^2+1)}$$ which is a rational function. Such a rational function is not altogether attractive, but we can make it look much nicer if we expand it in partial fractions. To that end, we look for an expansion of the form

$$G(s)=\frac{255s}{(s^2+2s+10)(s^2+1)}=\frac{A(s+1)+B}{s^2+2s+10}+\frac{Cs+D}{s^2+1}$$ for appropriate coefficients $A,B,C,D$. (The choice of $A(s+1)+B$ is convenient later.) Multiplying both sides by the denominator, we have

\begin{align} 255s &=(As+A+B)(s^2+1)+(Cs+D)(s^2+2s+10)\\ &=(A+C)s^3+(A+B+2C+D)s^2+(A+10C+2D)s+(A+B+10D). \end{align} We now need to match these coefficients term-by-term and solve for $A,B,C,D$. For instance, the lack of a cubic term on the right-hand side means that $A+C=0$. The coefficients thankfully prove to be integers, so I'll leave the computation of such as an exercise.

Having obtained such an expansion, what do we do with it? What we should notice now is that $G(s)$ may be expressed as

$$G(s) = A\frac{s+1}{(s+1)^2+9}+B\frac{1}{(s+1)^2+9}+C\frac{s}{s^2+1}+D\frac{1}{s^2+1}.$$

Each of these terms may be handled by use of your Laplace transform table. For instance, $\frac{s}{s^2+1}$ is the Laplace transform of $\cos t$. You'll also be well-served to remember how to generate Laplace transforms of the form $F(s+a)$. Hence we can determine $g(t)$ explicitly, and thereby determine $y(t)$ as desired. As above, the details are simple enough that I'll leave them as an exercise.


Alright, what about the differentiate-first approach? Before doing so, I'll focus attention on the interval $0\leq t\leq \pi$. Over this domain, we have

$$y' + 2y + 10\int_{0}^{t}y(\tau)\,d\tau = 255\sin t, \quad y(0) = 0.$$ By assumption, $y(0)=0$. Therefore if we evaluate this ODE at $t=0$ we have

$$y'(0)+2y(0)+10\int_0^0 y(\tau)\,d\tau =2y(0)=0$$ Hence $y'(0)=0$ as well. We now differentiate both sides of the ODE, obtaining the following IVP:

$$y''+2y'+10y=255\cos t,\quad y(0)=y'(0)=0.$$

This is an inhomogenous second-order ODE. The homogeneous part has the general solution $$y_h(t)=A e^{-t}\cos(3t)+Be^{-t}\sin(3t).$$ For the particular solution, I'll take an ansatz of the form $y_p=A_p \sin t+B_p\cos t$. Inserting this into the ODE, we find

$$(9A_p+2B_p)\sin t+(9B_p-2A_p)\cos t=255\cos t$$ which yields the appropriate $A_p,B_p$. We thus have

$$y(x)=A e^{-t}\cos(3t)+Be^{-t}\sin(3t)+A_p \sin t+B_p\cos t.$$ where $y(0)=y'(0)=0$ uniquely determines $A,B$.

So much for $0\leq t\leq \pi$. For $t\geq \pi$, the relevant ODE (upon differentiation) is $$y''+2y+10y=0.$$ This is just a homogeneous ODE, so the solution over this domain is simply $$y(t)=A'e^{-t}\cos(3t)+B'e^{-t}\sin(t).$$ However, the boundary conditions at $y(\pi),y'(\pi)$ must be obtained from those of the previous solution. Fortunately, the form of this solution is particularly nice at $t=\pi$ and so this doesn't present much hurdle. Therefore we can indeed construct the solution for all $t$ without resorting to the Laplace transform. As with the prior solution, the determination of the relevant coefficients is left as an exercise.