- #1
Mangoes
- 96
- 1
EDIT:
Nevermind I see what I did wrong near the end.
[tex] x'' + 4x = f(t) [/tex]
Where f(t) is 1 if t is between 0 and π, 0 if t > π. Initial conditions are x(0) = x'(0) = 0.
Transform of a derivative:
[tex] L(f^{(n)}(t)) = s^nF(s) - s^{n-1}f(0) -...-f^{n-1}(0) [/tex]
Transform of unit step function:
[tex] L(u(t-a)) = \frac{e^{-as}}{s} [/tex]
Letting u(t) be the step function, I wrote:
[tex] f(t) = 1 - u(t - π) [/tex]
So I rewrote the equation as
[tex] x'' + 4x = 1 - u(t - π) [/tex]
To take the Laplace transform of the left side, I used the transform of a derivative. Since the initial conditions are 0, the transform simplifies quite a bit. For the right side of the equation, I had to use the transform of the unit step function and the transform of 1.
[tex] s^2X(s) + 4X(s) = \frac{1}{s} - \frac{e^{-πs}}{s} [/tex]
Factored and moved around a bit to get:
[tex] X(s)(s^2 + 4) = \frac{1}{s}(1 - e^{-πs}) [/tex]
[tex] X(s) = \frac{1 - e^{-πs}}{(s)(s^2 + 4)} [/tex]
[tex] X(s) = \frac{1}{s(s^2 + 4)} - \frac{e^{-πs}}{s(s^2 + 4)} [/tex]
At this point I had a choice to do either a convolution or use partial fractions. Since I hate partial fractions, I went for a convolution, but it didn't work out and I had to end up using partial fractions.
Making up a new name:
[tex] G(s) = \frac{1}{s(s^2 + 4)} [/tex]
I used partial fractions and got this:
[tex] G(s) = \frac{1}{4s} - \frac{s}{4(s^2 + 4)} [/tex]
With the above I can easily do the inverse Laplace transform of the first term in X(s). But for the second term, I wanted to use the fact that
[tex] u(t-a)f(t-a) = e^{-as}F(s) [/tex]
where a = π and F(s) would be the same as G(s). The inverse Laplace transform of G(s) is
[tex] 4 - \frac{1}{4}cos(2t) [/tex]
And by just following the fact I just mentioned above, I would think that the Laplace transform of the second term in X(s) would be:
[tex] u(t - π)(4 - \frac{1}{4}cos(2(t - π)) [/tex]
cos(2t - 2pi) simplifies to cos(2t) due to periodicity of cosine.
So finally my final answer would be
[tex] f(t) = 4 - \frac{1}{4}cos(2t) - u(t - π)(4 - \frac{1}{4}cos(2t)) [/tex]
When I checked the answers, my answer was a little off. Normally, this really wouldn't bother me too much because there's a very good chance I made a small error somewhere, but I'm not too used to doing questions like these and I was wondering if anyone could find a really obvious glaring error the procedure I did. I have an exam tomorrow and it would be nice to make sure.
Nevermind I see what I did wrong near the end.
Homework Statement
[tex] x'' + 4x = f(t) [/tex]
Where f(t) is 1 if t is between 0 and π, 0 if t > π. Initial conditions are x(0) = x'(0) = 0.
Homework Equations
Transform of a derivative:
[tex] L(f^{(n)}(t)) = s^nF(s) - s^{n-1}f(0) -...-f^{n-1}(0) [/tex]
Transform of unit step function:
[tex] L(u(t-a)) = \frac{e^{-as}}{s} [/tex]
The Attempt at a Solution
Letting u(t) be the step function, I wrote:
[tex] f(t) = 1 - u(t - π) [/tex]
So I rewrote the equation as
[tex] x'' + 4x = 1 - u(t - π) [/tex]
To take the Laplace transform of the left side, I used the transform of a derivative. Since the initial conditions are 0, the transform simplifies quite a bit. For the right side of the equation, I had to use the transform of the unit step function and the transform of 1.
[tex] s^2X(s) + 4X(s) = \frac{1}{s} - \frac{e^{-πs}}{s} [/tex]
Factored and moved around a bit to get:
[tex] X(s)(s^2 + 4) = \frac{1}{s}(1 - e^{-πs}) [/tex]
[tex] X(s) = \frac{1 - e^{-πs}}{(s)(s^2 + 4)} [/tex]
[tex] X(s) = \frac{1}{s(s^2 + 4)} - \frac{e^{-πs}}{s(s^2 + 4)} [/tex]
At this point I had a choice to do either a convolution or use partial fractions. Since I hate partial fractions, I went for a convolution, but it didn't work out and I had to end up using partial fractions.
Making up a new name:
[tex] G(s) = \frac{1}{s(s^2 + 4)} [/tex]
I used partial fractions and got this:
[tex] G(s) = \frac{1}{4s} - \frac{s}{4(s^2 + 4)} [/tex]
With the above I can easily do the inverse Laplace transform of the first term in X(s). But for the second term, I wanted to use the fact that
[tex] u(t-a)f(t-a) = e^{-as}F(s) [/tex]
where a = π and F(s) would be the same as G(s). The inverse Laplace transform of G(s) is
[tex] 4 - \frac{1}{4}cos(2t) [/tex]
And by just following the fact I just mentioned above, I would think that the Laplace transform of the second term in X(s) would be:
[tex] u(t - π)(4 - \frac{1}{4}cos(2(t - π)) [/tex]
cos(2t - 2pi) simplifies to cos(2t) due to periodicity of cosine.
So finally my final answer would be
[tex] f(t) = 4 - \frac{1}{4}cos(2t) - u(t - π)(4 - \frac{1}{4}cos(2t)) [/tex]
When I checked the answers, my answer was a little off. Normally, this really wouldn't bother me too much because there's a very good chance I made a small error somewhere, but I'm not too used to doing questions like these and I was wondering if anyone could find a really obvious glaring error the procedure I did. I have an exam tomorrow and it would be nice to make sure.
Last edited: