Solution of delayed forcing function

  • I
  • Thread starter Jag1972
  • Start date
  • Tags
    Function
In summary: D?Keeping them as exact values means that you can apply the trigonometric identities I gave to convert your expression into that obtained by the Laplace transform method, thus showing that they are indeed equal.
  • #1
Jag1972
40
0
TL;DR Summary
Compare the solution of delayed forcing function differential equation using Laplace transform and method of undermined coefficients.
Tried to figure out myself but have now admitted defeat, requesting some guidance from you good people. Not looking for any specific answers, unless the problem is my working out and not my process.

If we take the following differential equation: ##y(t)'' + 4y(t) = 7u(t-2)## and determine solution for following time range: ##\:\:0\leq t \lt \infty \: ## with initial conditions: ##y(0) = 2, \:y'(0) = 4##.

First solved using Laplace Transforms (This is the most straight forward way), this is solution calculated.

##y(t) = u(t-2)(\frac {7}{4} - \frac {7}{4} cos (2(t-2))) + 2 cos (2t) + 2 sin (2t)##

I tried to get a solution that would match this using method of undermined coefficients. This was my approach which felt intuitive to me. Determined 2 separate solutions for the following differential equations:1) ##y(t)'' + 4y(t) = 0\:\:## for range ##\:\:0\leq t \lt 2 \: ## initial conditions ##y(0) = 2, \:y'(0) = 4##.
2) ##y(t)'' + 4y(t) = 7## for range ##\:\:0\leq t \lt \infty \: ## initial conditions ##y(2) = -2.8, \:y'(2) = 0.4##.

The 2 solutions obtained were:

1) ##y(t)=2 cos(2t) + 2 sin (2t)\:\:## for range ##\:\:0\leq t \lt 2 \: ##

The initial conditions for the second solution were determine using solution 1 and its derivative. Simply replaced t with 2 in both equations.

2) ##y(t)=(2.9) cos(2t) + (3.5) sin (2t) + \frac {7}{4}\:\:## for range ##\:\:0\leq t \lt 2 \: ##

My problem is that the Laplace transform and Undermined coefficients solutions don't give same results for ##t\geq2##.

for example when ##t=3##

1) Laplace Transform

##y(t) = u(t-2)(\frac {7}{4} - \frac {7}{4} cos (2(t-2))) + 2 cos (2t) + 2 sin (2t)##

## = u(1)(\frac {7}{4} - \frac {7}{4} cos (2(1))) + 2 cos (5) + 2 sin (5)##

2) Undermined Coefficients

##y(t)=(2.9) cos(2t) + (3.5) sin (2t) + \frac {7}{4}\:\:## for range ##\:\:0\leq t \lt 2 \: ##

##-0.7836=(2.9) cos(5) + (3.5) sin (5) + \frac {7}{4}\:\:## for range ##\:\:0\leq t \lt 2 \: ##

Would appreciate any support on this.
 
Last edited:
Physics news on Phys.org
  • #2
Jag1972 said:
TL;DR Summary: Compare the solution of delayed forcing function differential equation using Laplace transform and method of undermined coefficients.

Tried to figure out myself but have now admitted defeat, requesting some guidance from you good people. Not looking for any specific answers, unless the problem is my working out and not my process.

If we take the following differential equation: ##y(t)'' + 4y(t) = 7u(t-2)## and determine solution for following time range: ##\:\:0\leq t \lt \infty \: ## with initial conditions: ##y(0) = 2, \:y'(0) = 4##.

First solved using Laplace Transforms (This is the most straight forward way), this is solution calculated.

##y(t) = u(t-2)(\frac {7}{4} - \frac {7}{4} cos (2(t-2))) + 2 cos (2t) + 2 sin (2t)##

I tried to get a solution that would match this using method of undermined coefficients. This was my approach which felt intuitive to me. Determined 2 separate solutions for the following differential equations:1) ##y(t)'' + 4y(t) = 0\:\:## for range ##\:\:0\leq t \lt 2 \: ## initial conditions ##y(0) = 2, \:y'(0) = 4##.
2) ##y(t)'' + 4y(t) = 7## for range ##\:\:0\leq t \lt \infty \: ## initial conditions ##y(2) = -2.8, \:y'(2) = 0.4##.

The 2 solutions obtained were:

1) ##y(t)=2 cos(2t) + 2 sin (2t)\:\:## for range ##\:\:0\leq t \lt 2 \: ##

The initial conditions for the second solution were determine using solution 1 and its derivative. Simply replaced t with 2 in both equations.

2) ##y(t)=(2.9) cos(2t) + (3.5) sin (2t) + \frac {7}{4}\:\:## for range ##\:\:0\leq t \lt 2 \: ##

It is a mistake to use decimal approximations for the coefficients here. Instead retain the exact expressions in terms of [itex]\cos 4[/itex] and [itex]\sin 4[/itex]. For [tex]
y(t) = \frac74 + C\cos 2t + D\sin 2t[/tex] I find [tex]\begin{split}
C = 2 - \frac74 \cos 4 \\
D = 2 - \frac74 \sin 4. \end{split}[/tex] You can then simplify the result using the angle sum and difference formulae, [tex]
\begin{split}
\cos(a \pm b) &= \cos a \cos b \mp \sin a \sin b, \\
\sin(a \pm b) &= \sin a \cos b \pm \cos a \sin b.\end{split}[/tex] You should find that you get the same solution as the Laplace method.
 
Last edited:
  • #3
Many thanks sir for your reply, I am working it out now. Why is it a mistake to work out the values for the coefficients
 
  • #4
Jag1972 said:
Many thanks sir for your reply, I am working it out now. Why is it a mistake to work out the values for the coefficients

Keeping them as exact values means that you can apply the trigonometric identities I gave to convert your expression into that obtained by the Laplace transform method, thus showing that they are indeed equal.
 
  • #5
I am a little embarrassed to ask for help again but am stuck on the mathematics part and request further guidance.
How are you getting the value for constants, C and D. Are both solutions evaluated when t = 2, as shown?

## y(t) = 2 cos (4) + 2 sin (4)## for ## \:\:0\leq t \lt2##
## y(t) = \frac {7}{4}+C cos (4) +D sin (4)## for ## \:\:2\leq t \lt \infty##

when t=2, they equal each other

## y(t) = 2 cos (4) + 2 sin (4) = \frac {7}{4}+C cos (4) +D sin (4)##

Is this how the constants were worked out?

Thank you so much in advance
 
  • #6
Got the answer, however the expression for my constants is slightly different to yours, not sure why.

picking up for solution of differential equation using method of undetermined coefficients for following time range: ## 2\leq t \lt \infty##

Wrote equation and its derivative

## y =\:\:\:\:\:\:A cos(2t) + B sin(2t) + \frac{7}{4}\:\:\:\:\:\:## Equation 1
## y' = -2A sin(2t) + 2B cos(2t) \:\:\:\:\:\:\:\:\:\:\:\:## Equation 2

Multiplied Equation 1 by ## 2 sin (2t)## and equation 2 by ## cos(2t)## and added both

## \:\:\:\:2A cos(2t) sin(2t) + 2B sin^2(2t) + \frac{7}{2} sin(2t)##
## -2A sin(2t) cos(2t) + 2B cos^2(2t) ##

## 2B + \frac{7}{2} sin(2t) ## therefore ## B= -\frac{7}{4} sin (2t)##

By substituting B into Equation 2, got ##A = -\frac{7}{4} cos(2t)##

Set t = 2, this where the differential equation has non-zero input

A = -\frac{7}{4} cos(4)##
B = -\frac{7}{4} sin(4)##

The expressions obtained for unknown constants were slightly different to yours:

C = ##2 -\frac{7}{4} cos(4)##
D = ##2 -\frac{7}{4} sin(4)##

After substituting the expressions obtained for A and B into original differential equation and using trig identities got the same expression as Laplace Transform.

## y =\:\:\:\:\:\:(- \frac{7}{4} cos(4)) cos(2t) + (- \frac{7}{4} sin(4)) sin(2t) + \frac{7}{4}\:\:\:\:\:\:##
## y =\:\:\:\:\:\:- \frac{7}{4} cos(4) cos(2t) - \frac{7}{4} sin(4) sin(2t) + \frac{7}{4}\:\:\:\:\:\:##

Used product identities

## y =\:\:\:\:\:\:- \frac{7}{4} (cos(4) cos(2t) + sin(4) sin(2t) )+ \frac{7}{4}\:\:\:\:\:\:##

## y =\:\:\:\:\:\:- \frac{7}{4} (\frac{cos(2t-4)+cos(2t+4)}{2}) + (\frac{cos(2t-4)-cos(2t+4)}{2}) + \frac{7}{4}\:\:\:\:\:\:##

## y =\:\:\:\:\:\:- \frac{7}{4} (\frac{cos(2t-4)+cos(2t+4)+ cos(2t-4)-cos(2t+4)}{2}) + \frac{7}{4}\:\:\:\:\:\:##

## y =\:\:\:\:\:\:- \frac{7}{4} cos(2t-4) + \frac{7}{4}\:\:\:\:\:\:#### y =\:\:\:\:\:\: \frac{7}{4} - \frac{7}{4} cos(2(t-2)) \:\:\:\:\:\:##

This now matches my answer from Laplace transforms. The solution here only shows the function when ##t\leq2##

My question in practical terms, in order to plot function would we need to show the homogeneous solution when ##2\leq t \lt \infty## . The Laplace transform solution shows both parts summed. Does the homogeneous part actually play any part in the function when ##t\geq 2##

##y(t) = u(t-2)(\frac {7}{4} - \frac {7}{4} cos (2(t-2))) + 2 cos (2t) + 2 sin (2t)##

Should it be
##y(t) = u(t-2)(\frac {7}{4} - \frac {7}{4} cos (2(t-2))) + (u(t) - u(t - 2))(2 cos (2t) + 2 sin (2t))##

The u(t-2) on the right should now be exactly 2 should be just less than 2. Hope I have explained my question properly.
 

Similar threads

Replies
11
Views
1K
Replies
3
Views
3K
Replies
5
Views
1K
Replies
1
Views
1K
Replies
1
Views
1K
Replies
11
Views
2K
Replies
7
Views
1K
Back
Top