# Laplace transform - solve integral

1. Nov 23, 2014

### erba

1. The problem statement, all variables and given/known data
Solve the integral

$y(t) + \int_0^t (t-u)y(u) \, du = 3sin(2t)$

2. Relevant equations

3. The attempt at a solution
Rewrite the equation:

$y(t) = 3sin(2t) - \int_0^t (t-u)y(u) \, du$

I assume the integral to be the convolution:

$f(t) * y(t) = t * y(t)$

as

$f(t-u) = f(t) = t$

when

$u = 0$

Laplace transform both sides, and after simplification get:

$y(s) = \frac{6s^2}{(s^2 + 4)(s^2 + 1)}$

Apply partial fraction decomposition:

$y(s) = \frac{A}{s^2 + 4} + \frac{B}{s^2 + 1}$

and I find that:

$A = 8$
$B = -2$

Thus,

$y(s) = \frac{8}{s^2 + 4} - \frac{2}{s^2 + 1}$

Inverse Laplace transform then gives:

$y(t) = 4sin(2t) - 2sin(t)$

But then I want to double-check myself by substituting y(t) into the original equation, that we were supposed to solve. I.e.:

$y(t) + \int_0^b (t-u)y(u) \, du = 3sin(2t)$

$4sin(2t) - 2sin(t) + (4sin(2t) - 2sin(t)) \int_0^t (t-u) \, du = 3sin(2t)$

$4sin(2t) - 2sin(t) + \frac{t^2}{2}(4sin(2t) - 2sin(t)) \neq 3sin(2t)$

But LHS is not equal to RHS. Where is my mistake?
My intuitive feeling is that the error lies in my "partial fraction decomposition", as all the other processes are quite straight forward.

Thank you very much!

2. Nov 23, 2014

### vela

Staff Emeritus
Your mistake is here. You should have y(u) and not y(t), and you can't pull it out of the integral. It should be
$$4\sin 2t - 2\sin t + \int_0^t (t-u)(4\sin 2u - 2\sin u) \, du = 3sin(2t).$$

3. Nov 24, 2014

### erba

Thanks for the help!

I should use y(u) as I try to solve the integral, which I now realize depends on u and not t, right?
If I would have tried to solve the convolution then y(t) would have been the right choice?

Well, when I try to solve

$4\sin 2t - 2\sin t + \int_0^t (t-u)(4\sin 2u - 2\sin u) \, du = 3sin(2t)$

I get, for the integral

$2(u-t)cos(2u) - sin(2u) + 2(u-t)cos(u) - 2sin(u)$

and I can't see how that would solve the equation. I have tried different rewritings of the cos and sin terms, but still won't end up with whats asked.
I also get the t term, which I can't get rid of.

Last edited: Nov 24, 2014
4. Nov 24, 2014

### vela

Staff Emeritus
I'm not sure what you mean. The convolution is defined as
$$(f*g)(t) = \int_{-\infty}^{\infty} f(u)g(t-u)\,du.$$ The argument of y has to be either u or t-u.

The last term should be the opposite sign. You need to plug in the limits now.
$$[2(u-t)\cos 2u - \sin 2u + 2(u-t)\cos u + 2\sin u]\bigg|_0^t = \ ?$$ Some of the terms will vanish when u=0 and some others when u=t.

5. Nov 25, 2014

### erba

Tanks for the sign error. And I realized that I was a bit unclear in my previous post.
Solving the integral gives me:
$$-sin(2t) + 2sin(t) + 4t$$
Plugging that into the equation that we were supposed to solve gives
$$y(t) + \int_{0}^{t} (t-u)y(u)\,du = 3sin(2t)$$
$$4sin(2t) - 2sin(t) + \int_{0}^{t} (t-u)y(u)\,du = 3sin(2t)$$
$$4sin(2t) - 2sin(t) + (-sin(2t) + 2sin(t) + 4t) = 3sin(2t)$$
$$3sin(2t) + 4t = 3sin(2t)$$
$$4t = 0, t = 0$$
$$4t \neq 0, t \neq 0$$
But I guess my solution is incorrect. The solution should be 0 = 0 for all t.

6. Nov 25, 2014

### vela

Staff Emeritus
You have another sign error which I didn't catch before. After you integrate, you should end up with
$$[2(u-t)\cos 2u - \sin 2u - 2(u-t)\cos u + 2\sin u]\bigg|_0^t = \ ?$$ This time, the terms proportional to $t$ will cancel out.

7. Nov 26, 2014

### erba

Thanks for the help! Guess I should re-think even the, relatively, more trivial steps more often.