# Homework Help: Differential Equations with Dicontinuous Forcing Functions

1. Apr 18, 2010

### louis11

1. The problem statement, all variables and given/known data
Find the solution of the given initial value problem.

2. Relevant equations
y" + y = f(t); y(0) = 0, y'(0) = 1;

$$f(t) = \left\{ \begin{array}{c l} 1, & 0 \le t \le \pi/2 \\ 0, & \pi/2 \le t < \infty \end{array} \right.$$

Edit: That should be an f(t). Not an f(x) in the piecewise function. For whatever reason it defaults to the "x".

3. The attempt at a solution
My book provides one example regarding this type of problem. An example that I have been trying to follow for about the last hour to no avail. I believe the steps required to solve this problem are as follows:
1. Find the step function
2. Set the differential equation equal to the step function
3. Find the Laplace transform of both sides
4. Separate like terms. Find the inverse Laplace to solve for y(t)

I don't know if these steps are correct but it's what I took from the example provided. Anyway, below is what I've attempted:

L{y"+y} -> [s^2Y(s)-sy(0)-y'(0)] + Y(s) = f(t)
f(t) = 1 - u_pi/2(t)

Y(s) = [(1 - u_pi/2(t)) + 1] / (s^2 + 1)

At this point when I try and take the Laplace the answer I get isn't correct. It seems like it's on the right track, but I'm missing some element along the way that throws it off slightly.

Yesterday when I was working with step functions I had some difficulty with the "shifting". For some problems, to get the correct answer I had to "shift" the t by some factor, usually a boundary in the piecewise function. In this problem, do I need to shift? What's the purpose of the shift, and how do you know when you should do it?