Keep getting the wrong answer in this lengthy Laplace problem

In summary: = 16/s^3 + 16/s^2 + 8/s - 8e^(-4s) * (2/s^3 + 8/s^2 + 16/s) - 16e^(-4s) * (1/s^2 + 4/s) - 8e^(-4s) * 1/sy(t) = 16e^(-4s*t)
  • #1
Jonas E
15
0

Homework Statement


y'' + 4y = 8t^2 if 0 < t < 5, and 0 if t > 5; y(1) = 1 + cos(2), y'(1) = 4 - 2sin(2). Use the Laplace transform to find y.

Homework Equations


t-shift, s-shift, unit step function.

The Attempt at a Solution


I have been trying to solve it for hours, but keep getting the wrong solution. Each solution takes about 40 minutes, and I'm wondering if there is a faster way than my method, which is:

y'' + 4y = 8t^2 * [1 - u(t-5)] = 8t^2 - 8t^2 * u(t-5)

i set t = T + 1,

ỹ'' + 4ỹ = 8(T + 1)^2 - 8(T + 1)^2 * u(T - 4)

Then I use Laplace on both sides, and get some very messy expressions. I solve for Ỹ = ℒ(ỹ) on the left. I reduce everything on the right with partial fractions., which takes an insane amount of time. Then i find ỹ by taking the inverse Laplace on both sides. Finally, I substitute T with r - 1. Is this the correct way of doing it?
 
Physics news on Phys.org
  • #2
This first step is wrong:

Jonas E said:
y'' + 4y = 8t^2 * [1 - u(t-5)] = 8t^2 - 8t^2 * u(t-5)

In order to write ##f(t)## in terms of step functions, you need to write:

$$f(t) = 8t^2 [u(t - 0) - u(t - 5)] = 8t^2 u(t - 0) - 8t^2 u(t - 5)$$

Now obtain ##Y(s)## by applying the Laplace transform to both sides and continue.
 
  • #3
Zondrina said:
This first step is wrong:

Jonas E said:
y'' + 4y = 8t^2 * [1 - u(t-5)] = 8t^2 - 8t^2 * u(t-5)

Zondrina said:
In order to write ##f(t)## in terms of step functions, you need to write:

$$f(t) = 8t^2 [u(t - 0) - u(t - 5)] = 8t^2 u(t - 0) - 8t^2 u(t - 5)$$
But isn't u(t - 0) = 1 for t ≥ 0? How is what you wrote correct and what the OP wrote incorrect if both are the same.
Zondrina said:
Now obtain ##Y(s)## by applying the Laplace transform to both sides and continue.
It's possible that you (@Zondrina) didn't read the OP closely enough. What Jonas is trying to do is to use a translated coordinate system to get the initial conditions at 0 instead of 1.

Jonas, show us what you get when you take the Laplace transform of the last equation you show. What you describe as your process seems fine to me, except for the last step -- replace T by t - 1, not r - 1.

This DE happens to be easier to solve using other methods than by Laplace transforms. As a check on your work, you might go at it using another method, if you know another. Both methods should give the same solution.
 
  • Like
Likes Jonas E
  • #4
Jonas E said:

Homework Statement


y'' + 4y = 8t^2 if 0 < t < 5, and 0 if t > 5; y(1) = 1 + cos(2), y'(1) = 4 - 2sin(2). Use the Laplace transform to find y.

Homework Equations


t-shift, s-shift, unit step function.

The Attempt at a Solution


I have been trying to solve it for hours, but keep getting the wrong solution. Each solution takes about 40 minutes, and I'm wondering if there is a faster way than my method, which is:

y'' + 4y = 8t^2 * [1 - u(t-5)] = 8t^2 - 8t^2 * u(t-5)

i set t = T + 1,

ỹ'' + 4ỹ = 8(T + 1)^2 - 8(T + 1)^2 * u(T - 4)

Then I use Laplace on both sides, and get some very messy expressions. I solve for Ỹ = ℒ(ỹ) on the left. I reduce everything on the right with partial fractions., which takes an insane amount of time. Then i find ỹ by taking the inverse Laplace on both sides. Finally, I substitute T with r - 1. Is this the correct way of doing it?

Yes, provided that you did the steps correctly, which we cannot judge because you do not present the details. What is your final expression for ##y(t)##? I might be able to compare your final expression with mine.
 
  • Like
Likes Jonas E
  • #5
Sorry, @Mark44 , I meant T by t - 1, not r - 1.

Here are the steps I did:

y'' + 4y = 8t^2 * [1 - u(t-5)] = 8t^2 - 8t^2 * u(t-5)

ỹ'' + 4ỹ = 8(T + 1)^2 - 8(T + 1)^2 * u(T - 4)

ỹ'' + 4ỹ = 8(T^2 + 2T + 1) - 8(T^2 + 2T + 1) * u(t - 4)

I use Laplace on both sides and get:

s(s + 4)Ỹ - s - scos(2) + 2sin(2) - 8 - 4cos(2) = 16/s^3 + 16/s^2 + 8/s - 8ℒ(T^2 * u(t - 4)) - 16ℒ(T * u(t - 4)) - 8ℒ(u(t - 4))

s(s + 4)Ỹ - s - scos(2) + 2sin(2) - 8 - 4cos(2) = 16/s^3 + 16/s^2 + 8/s - 8e^(-4s) * (2/s^3 + 8/s^2 + 16/s) - 16e^(-4s) * (1/s^2 + 4/s) - 8e^(-4s) * 1/s

s(s + 4)Ỹ - s - scos(2) + 2sin(2) - 8 - 4cos(2) = (16 + 16s + 8s^2) / (s^3) - e^(-4s) * (16 - 80s - 200s^2) / (s^3)

Then I solve for Ỹ on the left, and get:

Ỹ = (16 + 16s + 8s^2) / [(s^4)(s+4)] - e^(-4s) * (16 - 80s - 200s^2) / [(s^4)(s+4)] + (s + scos(2) - 2sin(2) + 8 + 4cos(2)) / [s(s+4)]

Now I use partial fraction decomposition on all 3 terms:

first term) (16 + 16s + 8s^2) / [(s^4)(s+4)] = (As^3 + Bs^2 + Cs + D) / (s^4) + E / (s + 4)

I get A = -5 / 16, B = 5 / 4, C = 3, D = 4, E = 5 / 16second term) (16 - 80s - 200s^2) / [(s^4)(s+4)] = (As^3 + Bs^2 + Cs + D) / (s^4) + E / (s + 4)

I get A = -179 / 16, B = 179 / 4, C = 21, D = -4, E = 179 / 16third term) (s + scos(2) - 2sin(2) + 8 + 4cos(2)) / [s(s+4)] = A / s + B / (s + 4)

I get A = 2 - (1/2)sin(2) + cos(2), B = (1/2)sin(2) - 1Now I put it all together:

Ỹ = (-5 / 16s) + (5 / 4s^2) + (3 / s^3) + (4 / s^4) + (5 / 16(s+4)) + e^(-4s) * [(-179 / 16s) + (179 / 4s^2) + (21 / s^3) + (-4 / s^4) + (179 / 16(s+4))]
+ [2 - (1/2)sin(2) + cos(2)] / s + [(1/2)sin(2) - 1] / (s + 4)

(At this point I think I have already made a mistake somewhere, because it looks too messy to be correct)
Now I use inverse Laplace on both sides and get:

ỹ = (- 5 / 16) + (5/4)T + (3/2)T^2 + (2/3)T^3 + (5/16)e^(-4T) - (179/16)u(T - 4) + (179/4)(T-4)u(T - 4) + (21/2)(T-4)^2 * u(T - 4) - (2/3)(T-4)^3 * u(T - 4)
+ (179/16)e^(-4T + 16) * u(T-4) + [2 - (1/2)sin(2) + cos(2)] + [(1/2)sin(2) - 1]e^(-4T)

Now I simplify, and substitute T with t - 1, and get:

y = -5/16 + (5/4)(t-1) + (3/2)(t^2 -2t + 1) + (2/3)(t^3 -3t^2 +3t -1) + (5/16)e^(-4t+4) + 2 - (1/2)sin(2) + cos(2) + (1/2)sin(2)e^(-4t+4) - e(-4t+4) + (179e^20 / 16)e^(-4t)
+ [5323/48 - (441/4)t \ (41/2)t^2 - (2/3)t^3]u(t-5)

Thanks a lot for the feedback.

P.S.
The final expression, according to Kreyszig's "Advanced Engineering Mathematics, 9th edition", should be:

cos(2t) + 2t^2 - 1, if 0 < t < 5

cos(2t) + 49cos(2t - 10 + 10sin(2t - 10), if t > 5
 
  • #6
Jonas E said:
Sorry, @Mark44 , I meant T by t - 1, not r - 1.

Here are the steps I did:

y'' + 4y = 8t^2 * [1 - u(t-5)] = 8t^2 - 8t^2 * u(t-5)

ỹ'' + 4ỹ = 8(T + 1)^2 - 8(T + 1)^2 * u(T - 4)

ỹ'' + 4ỹ = 8(T^2 + 2T + 1) - 8(T^2 + 2T + 1) * u(t - 4)

I use Laplace on both sides and get:

s(s + 4)Ỹ - s - scos(2) + 2sin(2) - 8 - 4cos(2) = 16/s^3 + 16/s^2 + 8/s - 8ℒ(T^2 * u(t - 4)) - 16ℒ(T * u(t - 4)) - 8ℒ(u(t - 4))
I believe that your mistake is in the line above. The transformation you did, T = t - 1, is in the t domain, not in the s domain. Taking the Laplace transform of the diff. equation a few lines up should give you this:
##s^2Ỹ - s + \text{ rest of the stuff}##.

I agree that this is a very messy problem, made much more difficult by the initial conditions.

Since problems like this have so many steps, I've found that it's a good idea to check all steps that I can. For example, after doing a step with partial fractions, verify that my decomposition actually gets me back to what I started with.
Jonas E said:
s(s + 4)Ỹ - s - scos(2) + 2sin(2) - 8 - 4cos(2) = 16/s^3 + 16/s^2 + 8/s - 8e^(-4s) * (2/s^3 + 8/s^2 + 16/s) - 16e^(-4s) * (1/s^2 + 4/s) - 8e^(-4s) * 1/s

s(s + 4)Ỹ - s - scos(2) + 2sin(2) - 8 - 4cos(2) = (16 + 16s + 8s^2) / (s^3) - e^(-4s) * (16 - 80s - 200s^2) / (s^3)

Then I solve for Ỹ on the left, and get:

Ỹ = (16 + 16s + 8s^2) / [(s^4)(s+4)] - e^(-4s) * (16 - 80s - 200s^2) / [(s^4)(s+4)] + (s + scos(2) - 2sin(2) + 8 + 4cos(2)) / [s(s+4)]

Now I use partial fraction decomposition on all 3 terms:

first term) (16 + 16s + 8s^2) / [(s^4)(s+4)] = (As^3 + Bs^2 + Cs + D) / (s^4) + E / (s + 4)

I get A = -5 / 16, B = 5 / 4, C = 3, D = 4, E = 5 / 16second term) (16 - 80s - 200s^2) / [(s^4)(s+4)] = (As^3 + Bs^2 + Cs + D) / (s^4) + E / (s + 4)

I get A = -179 / 16, B = 179 / 4, C = 21, D = -4, E = 179 / 16third term) (s + scos(2) - 2sin(2) + 8 + 4cos(2)) / [s(s+4)] = A / s + B / (s + 4)

I get A = 2 - (1/2)sin(2) + cos(2), B = (1/2)sin(2) - 1Now I put it all together:

Ỹ = (-5 / 16s) + (5 / 4s^2) + (3 / s^3) + (4 / s^4) + (5 / 16(s+4)) + e^(-4s) * [(-179 / 16s) + (179 / 4s^2) + (21 / s^3) + (-4 / s^4) + (179 / 16(s+4))]
+ [2 - (1/2)sin(2) + cos(2)] / s + [(1/2)sin(2) - 1] / (s + 4)

(At this point I think I have already made a mistake somewhere, because it looks too messy to be correct)
Now I use inverse Laplace on both sides and get:

ỹ = (- 5 / 16) + (5/4)T + (3/2)T^2 + (2/3)T^3 + (5/16)e^(-4T) - (179/16)u(T - 4) + (179/4)(T-4)u(T - 4) + (21/2)(T-4)^2 * u(T - 4) - (2/3)(T-4)^3 * u(T - 4)
+ (179/16)e^(-4T + 16) * u(T-4) + [2 - (1/2)sin(2) + cos(2)] + [(1/2)sin(2) - 1]e^(-4T)

Now I simplify, and substitute T with t - 1, and get:

y = -5/16 + (5/4)(t-1) + (3/2)(t^2 -2t + 1) + (2/3)(t^3 -3t^2 +3t -1) + (5/16)e^(-4t+4) + 2 - (1/2)sin(2) + cos(2) + (1/2)sin(2)e^(-4t+4) - e(-4t+4) + (179e^20 / 16)e^(-4t)
+ [5323/48 - (441/4)t \ (41/2)t^2 - (2/3)t^3]u(t-5)

Thanks a lot for the feedback.

P.S.
The final expression, according to Kreyszig's "Advanced Engineering Mathematics, 9th edition", should be:

cos(2t) + 2t^2 - 1, if 0 < t < 5

cos(2t) + 49cos(2t - 10 + 10sin(2t - 10), if t > 5
 
  • Like
Likes Jonas E
  • #7
Ah, thanks a lot for the help. So, the mistake was that s(s + 4)Ỹ should have been (s^2 + 4)Ỹ instead? It seems I accidentally calculated 4ℒ(ỹ) to be 4sỸ
 
  • #8
Jonas E said:
Ah, thanks a lot for the help. So, the mistake was that s(s + 4)Ỹ should have been (s^2 + 4)Ỹ instead? It seems I accidentally calculated 4ℒ(ỹ) to be 4sỸ
Yes, I believe so.
You had ##\bar{y"} + 4\bar{y}## on the left side. After the transform, this would be ##s^2Y(s) - s\bar{y'}(0) - \bar{y}(0) + 4Y(s) = (s^2 + 4)Y(s) + \text{ other stuff}##.

You showed a lot of work, so it's possible there are other mistakes. What I noted was what caught my eye.
 
  • Like
Likes Jonas E
  • #9
Jonas E said:
Sorry, @Mark44 , I meant T by t - 1, not r - 1.

Here are the steps I did:

y'' + 4y = 8t^2 * [1 - u(t-5)] = 8t^2 - 8t^2 * u(t-5)

ỹ'' + 4ỹ = 8(T + 1)^2 - 8(T + 1)^2 * u(T - 4)

ỹ'' + 4ỹ = 8(T^2 + 2T + 1) - 8(T^2 + 2T + 1) * u(t - 4)

I use Laplace on both sides and get:

s(s + 4)Ỹ - s - scos(2) + 2sin(2) - 8 - 4cos(2) = 16/s^3 + 16/s^2 + 8/s - 8ℒ(T^2 * u(t - 4)) - 16ℒ(T * u(t - 4)) - 8ℒ(u(t - 4))

s(s + 4)Ỹ - s - scos(2) + 2sin(2) - 8 - 4cos(2) = 16/s^3 + 16/s^2 + 8/s - 8e^(-4s) * (2/s^3 + 8/s^2 + 16/s) - 16e^(-4s) * (1/s^2 + 4/s) - 8e^(-4s) * 1/s

s(s + 4)Ỹ - s - scos(2) + 2sin(2) - 8 - 4cos(2) = (16 + 16s + 8s^2) / (s^3) - e^(-4s) * (16 - 80s - 200s^2) / (s^3)

Then I solve for Ỹ on the left, and get:

Ỹ = (16 + 16s + 8s^2) / [(s^4)(s+4)] - e^(-4s) * (16 - 80s - 200s^2) / [(s^4)(s+4)] + (s + scos(2) - 2sin(2) + 8 + 4cos(2)) / [s(s+4)]

Now I use partial fraction decomposition on all 3 terms:

first term) (16 + 16s + 8s^2) / [(s^4)(s+4)] = (As^3 + Bs^2 + Cs + D) / (s^4) + E / (s + 4)

I get A = -5 / 16, B = 5 / 4, C = 3, D = 4, E = 5 / 16second term) (16 - 80s - 200s^2) / [(s^4)(s+4)] = (As^3 + Bs^2 + Cs + D) / (s^4) + E / (s + 4)

I get A = -179 / 16, B = 179 / 4, C = 21, D = -4, E = 179 / 16third term) (s + scos(2) - 2sin(2) + 8 + 4cos(2)) / [s(s+4)] = A / s + B / (s + 4)

I get A = 2 - (1/2)sin(2) + cos(2), B = (1/2)sin(2) - 1Now I put it all together:

Ỹ = (-5 / 16s) + (5 / 4s^2) + (3 / s^3) + (4 / s^4) + (5 / 16(s+4)) + e^(-4s) * [(-179 / 16s) + (179 / 4s^2) + (21 / s^3) + (-4 / s^4) + (179 / 16(s+4))]
+ [2 - (1/2)sin(2) + cos(2)] / s + [(1/2)sin(2) - 1] / (s + 4)

(At this point I think I have already made a mistake somewhere, because it looks too messy to be correct)
Now I use inverse Laplace on both sides and get:

ỹ = (- 5 / 16) + (5/4)T + (3/2)T^2 + (2/3)T^3 + (5/16)e^(-4T) - (179/16)u(T - 4) + (179/4)(T-4)u(T - 4) + (21/2)(T-4)^2 * u(T - 4) - (2/3)(T-4)^3 * u(T - 4)
+ (179/16)e^(-4T + 16) * u(T-4) + [2 - (1/2)sin(2) + cos(2)] + [(1/2)sin(2) - 1]e^(-4T)

Now I simplify, and substitute T with t - 1, and get:

y = -5/16 + (5/4)(t-1) + (3/2)(t^2 -2t + 1) + (2/3)(t^3 -3t^2 +3t -1) + (5/16)e^(-4t+4) + 2 - (1/2)sin(2) + cos(2) + (1/2)sin(2)e^(-4t+4) - e(-4t+4) + (179e^20 / 16)e^(-4t)
+ [5323/48 - (441/4)t \ (41/2)t^2 - (2/3)t^3]u(t-5)

Thanks a lot for the feedback.

P.S.
The final expression, according to Kreyszig's "Advanced Engineering Mathematics, 9th edition", should be:

cos(2t) + 2t^2 - 1, if 0 < t < 5

cos(2t) + 49cos(2t - 10 + 10sin(2t - 10), if t > 5

I think you made an error in your transformation of the LHS. I will use the notation ##z(T)## instead of ##y(T+1)##, so on the left you should have
[tex] {\cal L} ( z^{''} + 4 z ) (s) = s[s Z_s - z(0)] - z'(0) + 4 Z_s = (s^2 + 4) Z_s - s(1 + \cos(2)) - (4 - 2 \sin(2)) [/tex]
Here, ##Z_s = {\cal L} (z)(s)##.

The correct expression on the left is different from yours.
 

Related to Keep getting the wrong answer in this lengthy Laplace problem

What is the Laplace problem?

The Laplace problem refers to a mathematical equation known as the Laplace equation, which is a second-order partial differential equation. It is used to model the behavior of certain physical systems, such as heat conduction or electrostatics.

Why am I getting the wrong answer in this lengthy Laplace problem?

There could be several reasons for getting the wrong answer in a lengthy Laplace problem. It could be due to human error, such as a mistake in the calculations or misinterpreting the problem. It could also be due to numerical errors, such as rounding or truncation errors in the computer program used to solve the problem.

How can I ensure I am getting the correct answer in a lengthy Laplace problem?

To ensure you are getting the correct answer in a lengthy Laplace problem, it is important to double-check your calculations and make sure you understand the problem correctly. It is also helpful to use multiple methods or software programs to solve the problem and compare the results.

What are some common mistakes to avoid in solving a lengthy Laplace problem?

Some common mistakes to avoid in solving a lengthy Laplace problem include forgetting to include boundary conditions, using incorrect units, and making arithmetic errors. It is also important to carefully read and understand the problem before attempting to solve it.

Is there a specific technique or strategy for solving lengthy Laplace problems?

Yes, there are several techniques and strategies for solving lengthy Laplace problems. These include using separation of variables, the method of images, and the method of integral transforms. It is important to choose the most appropriate method for the specific problem at hand.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
218
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
865
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
201
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
691
  • Calculus and Beyond Homework Help
Replies
7
Views
721
Replies
5
Views
1K
Back
Top