# Differential equation using laplace transforms

## Homework Statement

y'' + y = delta(t-2*pi)

## The Attempt at a Solution

I have solved this using laplace transforms.

Y = e^(-2*pi*s)/(s^2 + 1) + 10s/(s^2 + 1)

so that

y = sint*u(t - 2*pi) + 10 *cost

what I don't understand is this function is not definied for t<0. According to my book, the answer is:

y = 10 cos t if 0<t<2*pi and y = 10cost + sint if t>2*pi

Why is this?

Last edited:

Dick
Homework Helper
u(t-2*pi) IS defined for t<0. It's equal to zero. In fact, it's equal to 0 for t<2*pi and 1 for t>2*pi.

So I'm right to say that the answer here is:

y = 10*cos(t) if t<2*pi, and
y = 10*cos(t) + sin(t) if t>2*pi

?

Dick
Homework Helper
So I'm right to say that the answer here is:

y = 10*cos(t) if t<2*pi, and
y = 10*cos(t) + sin(t) if t>2*pi

?

Absolutely right.

HallsofIvy
Homework Helper
Since I have made it clear many times that I dislike the "Laplace transform" method (in only works for linear equations with constant coefficients that you can do more easily anyway):

The general solution to the associated homogeneous equation is y"+ y= 0 which has y(t)= C cos(t)+ D sin(t) as general solution. Use "variation of parameters" to find a specific solution to the entire equation:

We seek a solution of the form y(t)= u(t) cos(t)+ v(t) sin(t). Differentiating, y'= u' cos(t)- u sin(t)+ v' sin(t)+ v cos(t). Since we need only one out of the infinitely many solutions, we can simplify by requiring that u' cos(t)+ v' sin(t)= 0. Then y'= -u sin(t)+ v cos(t) and, differentiating again, y"= -u' sin(t)- u cos(t)+ v' cos(t)- v sin(t). y"+ y = -u' sin(t)+ v'cos(t)= $\delta(t- 2\pi)$.

That, together with u' cos(t)+ v' sin(t)= 0 gives two equations to solve for u' and v'. Multiplying the first equation by cos(t) and the second by sin(t) and adding eliminates u':
v'= $cos(t) \delta(t- 2\pi)$ and the integral of that, by definition of the delta function, is v(t)= 0 if x< $2\pi$, cos(2\pi)= 1 if $x\le 2\pi$, in other words, $H(x- 2\pi)$ where H is the Heaviside step function.
Multiplying the first equation by sin(t) and the second by -cos(t) and adding eliminates v': u'= -sin(t)[/itex]\delta(x-2\pi)[/itex] and integrating that u(t)= 0 is x< 2$\pi$, -sin(2\pi)= 0 if $x\ge 2\pi$. In other words, v(t)= 0 for all t.

The specific function, y(t)= u(t) cos(t)+ v(t) sin(t) is $H(x- 2\pi) sin(x)$ so the general solution to the entire equation is $y(t)= C cos(t)+ D sin(t)+ H(x-2\pi)\delta(x-2\pi)$.

I notice that the initial conditions for the problem were never stated.