# Second Order Differential Equation

This is the question word for word:

a) Solve the initial value problem: $$x'' + x = 2cos(\omega t) ; x(0) = 0 ; x'(0) = 0 ; \omega != 1$$

b) repeat but with \omega = 1
c) use the trigonometric identity: $$cos(\alpha) - cos(\beta) = -2sin(\frac{\alpha + \beta}{2})sin(\frac{\alpha - \beta}{2})$$

i.e. as a sinusoidal function oscillating inside an envelope A(t).
Determine the function A(t). Show that it is a slowly oscillating function if ! is close
to 1.

## The Attempt at a Solution

a) $$\lambda^2 + 1 = 0$$ Solving for general inhomogeneous.

$$\lambda = \frac{+}{} i$$

Therefore: $$x_{gi} = Ae^{it} + Be^{-it}$$ Where A and B are arbitrary constants.

Now solving for homogeneous solution, take form: $$x_p = asin(\omega t) + bcos(\omega t)$$

where a and b are arbitrary constants, therefore, $$x'_p = a\omega cos(\omega t) - b\omega sin(\omega t)$$

therefore $$x''_p = -a\omega^2 sin(\omega t) - b\omega^2 cos(\omega t)$$

Subbing these values in for the IVP yields:

$$-a\omega^2 sin(\omega t) - b\omega^2 cos(\omega t) + x_p = asin(\omega t) + bcos(\omega t) = 2cos(\omega t)$$

By equating co-efficients; $$b - b\omega^2 = 2$$

and $$a - a\omega^2 = 0$$

Therefore the homogeneous solution = $$\frac{2cos(\omega t)}{1-\omega^2} - \frac{2\omega^2 cos(\omega t)}{1-\omega^2}$$

Common factor taken out $$\frac{2cos(\omega t)}{1-\omega^2}(1-\omega^2) = 2cos(\omega t)$$

General homogeneous solution = $$Ae^{it} + Be^{-it} + 2cos(\omega t)$$ By using the initial conditions:

$$A + B + 2 = 0$$

and $$Ai - Bi = 0$$

This implies: $$A = B = -1$$

Therefore particular homogeneous solution = $$x(t) = -e^{it} - e^{-it} + 2cos(\omega t)$$

b) This is the first part that confuses me, before I factored out $$1 - \omega^2$$ and cancelled, I could not have omega = 1 because it would be dividing by zero, but since I cancelled it allows me to. Did I make an error in cancelling? It would seem logically that I did due to the nature of the question. So I know my answer is going to either be undefined, or:

$$-e^{-it} - e^{it}$$

c) Once again I'm not entirely sure how to approach this, I can see that my solution:

$$\frac{2cos(\omega t)}{1-\omega^2} - \frac{2\omega^2 cos(\omega t)}{1-\omega^2}$$

loosely fits the trig identity given, but it has constant coefficients and I'm not sure what to do with them. Also the terms inside the cosine function are identical, so it's not really:

$$cos(\alpha) + cos(\beta)$$ unless alpha = beta which is possible, but I am doubting it due to the way the question is worded.

So I assume that either it's correct, and I just need someone to read over it so that I know if I'm on the right track, or waaay off, or it's full of mistakes.

HallsofIvy
Homework Helper
It might be better to use the real solutions $C_1 sin(\omega t)+ C_2 cos(\omega t)[/tex] rather than the complex exponentials as you have. That, at least would make it clear why the solution that works for (a) will not work for [itex]\omega= 1$. Have you learned anything about what to do if the "right hand side" of a non-homogeneous equation is already a solution to the related homogeneous equation?

For example, the general solution to dy/dx- y= 0 is y= Cex. What would you do with dy/dx- y= ex?

Thanks for the quick response,

I'm not sure if I am interpreting what you said about the complex exponential correctly, but I think you're saying to ignore the imaginary parts of the solution,

So it looks like: $$x(t) = -e^{-it} - e^{-it} + 2cos(\omega t)$$

and then this becomes $$-cos(t) - isin(t) - cos(t) + isin(t) + 2cos(\omega t)$$
The imaginary parts cancel, and as omega = 1, so do the real parts so we're left with x(t) = 0

Also, I just skimmed over my lecture notes again and can't see or recall anything showing what to do if the RHS is related to the solution. Is using this knowledge the only way to solve this question?
Cheers,

So I thought a bit harder about the complex exponential and re-wrote it like this before I solved for A and B:

$$Ae^{it} + Be^{-it} + 2cos(\omega t) = 0$$ Therefore:

$$A[cos(t) + isin(t)] + B[cos(t) - isin(t)] + 2cos(\omega t) = 0$$

$$(A + B)cos(t) + (Ai - Bi)sin(t) + 2cos(\omega t) = 0$$

$$Let A + B = C_1 and Ai - Bi = C_2$$

Therefore:

$$C_1cos(t) + C_2sin(t) + 2cos(\omega t) = 0$$

and from the other initial condition:

$$-C_1sin(t) + C_2cos(t) - 2\omega sin(\omega t) = 0$$

Therefore: $$C_1 = -2 and C_2 = 0$$

So: $$x(t) = -2cos(t) + 2cos(\omega t)$$ and if omega = 1, x(t) = 0.

Is this more correct than my previous post? Or does it look like I've made mistakes?
Thanks,

EDIT: Oh my! I just realised that it's taken the form required for part c) (pardon my slowness). Thanks so much for all the help so far, if someone would be so kind to let me know if what I've done is right so far (whenever they have time) it would be greatly appreciated.

Okay, so everything seems to be coming along ok so far, now I need to take a limit of $$x(t) = -2cos(t) + 2cos(\omega t)$$ as omega approaches 1, using l'hopital's rule.

That despite the fact that t is the variable that x is dependent upon, in order to take a limit of omega, I have to differentiate x(t) with respect to omega.

I'm probably doing this wrong because I can't recall having done it before (it may not have been taught thoroughly as it is a bonus question) but this is what I've got:

$$\frac{d}{d\omega} [-2cos(t) + 2cos(\omega t)] = -2tsin(\omega t)$$
and as omega approaches 1, x approaches zero. Despite the fact that this is the correct answer, I'm not sure if I went about the correct method.

Thanks

Although math professor may not agree but I think the problem is perfectly set up to be solved by Laplace transform. The differential equation describes the response of an undamped 2nd order system with $$\omega_{n}=1$$, excited by a steady sinusoid at t>0 while it's completely at rest for t<0, which are classical engineering phenomenons -- beat and resonance.

When $$\omega \neq \omega_{n}$$, it beats, or amplitude modulated. The solution is in form of $$A \sin \dfrac{(\omega-\omega_{n})t}{2}sin \dfrac{(\omega+\omega_{n})t}{2}$$.

When $$\omega = \omega_{n}$$, it resonates, the solution is unbounded, something like $$B*t \sin(\omega t)$$

Let me find out the A and B tomorrow.

Hmmm okay thanks for that, but I don't really see how it helps sorry.
I'm pretty sure that I've got everything up until the limit correct, if anyone has spare time in the next day or two to check that I would greatly appreciate it. As for the limit I have a big feeling that I've done it wrong, but I don't know how else I would do it, I could possibly differentiate implicitly instead of letting t remain constant. However it could get messier than necessary.

As for all of the spring stuff and laplace transformations, we have not been taught laplace yet and there is nothing in the question defining spring systems, so is what you posted earlier an assumption klondike? Or is it a rule?

Thanks

HallsofIvy
Homework Helper
Although math professor may not agree but I think the problem is perfectly set up to be solved by Laplace transform.
Ahh, you know me don't you!

Rake MC, one thing most people learn early in an introductory differential equations course is, "if the right hand side of a non-homogeneous equation contains one of the solutions to the corresponding homogeneous equation, then you multiply the that function by the independent variable to get the specific solution.

In other words, if the differential equation is x"+ x= cos(t) you know that the solution to x"+ x= 0 involves sin(t) and cos(t) so just "Acos(t)" itself will not work as a solution to the entire equation: it will give 0 no matter what A is.

So mutiply the general solution, A cos(t)+ B sin(t), by t to try a solution of the form At cos(t)+ Bt sin(t). If x= At cos(t), then x'= A cos(t)- A t sin(t)+ B sin(t)+ Bt cos(t) and x"= -2A sin(t)- At cos(t)+ 2B cos(t)- B t sin(t). x"+ x'= -2A sin(t)- At cos(t))+ 2B cos(t)- Bt sin(t)+ At cos(t)+ Bt sin(t)= -2Asin(t)+ 2B cos(t) and that must be equal to cos(t). Take A= 0, B= 1/2 so the general solution is x(t)= C cos(t)+ D sin(t)+ (1/2)t sin(t).

Notice that while the sine and cosine solutions you get for $\omega\ne 1$ are bounded, this solution is not. This is referred to as "resonance".

Thanks a heap for that HallsofIvy and Klondike.

I do vaguely recollect that you had to multiply through if you have the same term in your solution.

you said that -2Asin(t) + 2Bcos(t) has to equal cos(t), but in the question it says $$x'' + x = 2cos(\omega t)$$

Is that what you meant, or if not why would it only equal 2cos(t)?

Also, you say that my general form would be Atcos(t) + Btsin(t), I can accept this. But do I have to do anything with the omega? I acknowledge that it's a constant, but it's an unknown constant nonetheless.

With my previous mistakes aside, was I on the right track with what you said about the complex exponential?
Cheers.

b-bw^2 = 2
a-aw^2 = 0

these don't make sense though. If you solve the equation, dont you get w = +/- 1 ? meaning to say b - b(1) = 2? << shouldn that be b- b(1) = 0? That doesnt match.

I doubt something went wrong in your particular solution. x(p) = asin(wt) + bcos(wt) . As far as i could remember, the lecturer said to find the particular solution, differentiate R(t) = 2cos(wt) to get the terms required. In this case, you will need cos(wt), w(sin(wt), w^2(cos(wt)) . Please correct me if I am wrong. Cheers.

Rake, I think you got the particular integral wrong. Once you sort the complete solution out for w!=1, you can take the limit as w approaches 1 to solve the second problem.

The other way to solve it is write the excitation in complex form 2e^(jwt), recall that y_p=(te^(jwt))/P'(jw) if jw is a simple pole where P(D) is D^2+1 in your case. because the excitation is cos, you take the real part of y_p and throw the imaginary part away.

You could also use convolution if you have been taught the concept of system transfer function.

Lastly, doing it with Laplace transform takes 1 minute by looking up my collection of LT table:)

By the way, I'm having big problem with Latex after switching to the new server. If I do a preview post, all my latex typing show stale image which I posted to other threads. Am I the only one having the problem?

Hmmm okay thanks for that, but I don't really see how it helps sorry.
I'm pretty sure that I've got everything up until the limit correct, if anyone has spare time in the next day or two to check that I would greatly appreciate it. As for the limit I have a big feeling that I've done it wrong, but I don't know how else I would do it, I could possibly differentiate implicitly instead of letting t remain constant. However it could get messier than necessary.

As for all of the spring stuff and laplace transformations, we have not been taught laplace yet and there is nothing in the question defining spring systems, so is what you posted earlier an assumption klondike? Or is it a rule?

Thanks