# Second Order Inhomogeneous Differential Equation

• Oct 18th 2008, 05:00 PM
U-God
Second Order Inhomogeneous Differential Equation
Hey guys, I thought I had this question solved, wrote it out in final copy and everything and then I realised I'd made a big mistake. Was hoping someone here would be able to give me a few pointers.

a) Solve the initial value problem: $\displaystyle x'' + x = 2cos(\omega t)$

So first I solved homogeneous general solution: $\displaystyle \lambda^2 + 1 = 0$

Therefore the solution looks like: $\displaystyle Ae^{it} + Be^{-it}$

But I only want real answers, so I use complex exponential to achieve:

$\displaystyle C_1cos(t) + C_2sin(t)$

Where C1 and C2 are real arbitrary constants.

Then I have to solve for inhomogeneous solution. My error was that the first time I did this I took the form to be $\displaystyle x = acos(\omega t) + bsin(\omega t)$

However it was pointed out to me that I can't use sine and cosine on their own because they are in the homogeneous general solution. So I think I have to change the form to: $\displaystyle x = atcos(\omega t) + btsin(\omega t)$

Then I differentiate twice to get $\displaystyle x'' = -2a\omega sin(\omega t) - at\omega^2 cos(\omega t) + 2b\omega cos(\omega t) - bt\omega^2 sin(\omega t)$

Subbing these in to $\displaystyle x'' + x = 2cos(\omega t)$

Gives me: $\displaystyle -2a\omega sin(\omega t) - at\omega^2 cos(\omega t) + 2b\omega cos(\omega t)$ $\displaystyle - bt\omega^2 sin(\omega t) + atcos(\omega t) + btsin(\omega t) = 2cos(\omega t)$

Then I equate the co-efficients and get:

$\displaystyle sin(\omega t) : -2a\omega = 0$
$\displaystyle cos(\omega t) : 2b\omega = 2$
$\displaystyle tsin(\omega t) : b - b\omega^2 = 0$
$\displaystyle tcos(\omega t) : a - a\omega^2 = 0$

By here I think I've done something drastically wrong. If anyone is able to see if I'm even on the right track it would be greatly appreciated. This is quite urgent, but anything will help! Thanks a lot in advance,
U-god
• Oct 18th 2008, 07:01 PM
U-God
I'm beginning to think perhaps$\displaystyle x = atcos(\omega t) + btsin(\omega t)$ is the wrong form..
• Oct 18th 2008, 07:13 PM
mr fantastic
Quote:

Originally Posted by U-God
Hey guys, I thought I had this question solved, wrote it out in final copy and everything and then I realised I'd made a big mistake. Was hoping someone here would be able to give me a few pointers.

a) Solve the initial value problem: $\displaystyle x'' + x = 2cos(\omega t)$

So first I solved homogeneous general solution: $\displaystyle \lambda^2 + 1 = 0$

Therefore the solution looks like: $\displaystyle Ae^{it} + Be^{-it}$

But I only want real answers, so I use complex exponential to achieve:

$\displaystyle C_1cos(t) + C_2sin(t)$

Where C1 and C2 are real arbitrary constants.

Then I have to solve for inhomogeneous solution. My error was that the first time I did this I took the form to be $\displaystyle x = acos(\omega t) + bsin(\omega t)$

However it was pointed out to me that I can't use sine and cosine on their own because they are in the homogeneous general solution. So I think I have to change the form to: $\displaystyle x = atcos(\omega t) + btsin(\omega t)$

Then I differentiate twice to get $\displaystyle x'' = -2a\omega sin(\omega t) - at\omega^2 cos(\omega t) + 2b\omega cos(\omega t) - bt\omega^2 sin(\omega t)$

Subbing these in to $\displaystyle x'' + x = 2cos(\omega t)$

Gives me: $\displaystyle -2a\omega sin(\omega t) - at\omega^2 cos(\omega t) + 2b\omega cos(\omega t)$ $\displaystyle - bt\omega^2 sin(\omega t) + atcos(\omega t) + btsin(\omega t) = 2cos(\omega t)$

Then I equate the co-efficients and get:

$\displaystyle sin(\omega t) : -2a\omega = 0$
$\displaystyle cos(\omega t) : 2b\omega = 2$
$\displaystyle tsin(\omega t) : b - b\omega^2 = 0$
$\displaystyle tcos(\omega t) : a - a\omega^2 = 0$

By here I think I've done something drastically wrong. If anyone is able to see if I'm even on the right track it would be greatly appreciated. This is quite urgent, but anything will help! Thanks a lot in advance,
U-god

Using $\displaystyle x = a \cos(\omega t) + b \sin(\omega t)$ as the form of the particular is OK provided $\displaystyle \omega \neq 1$.

If $\displaystyle \omega = 1$ then the DE is $\displaystyle x'' + x = 2 \cos t$. In this case use $\displaystyle x = (t + ct^2)(a \cos t + b \sin t)$ as the form of the particular solution.
• Oct 18th 2008, 07:17 PM
U-God
Ok thanks for that,
However, I was taught that if a term is in the homogeneous general solution, you cannot use that term in your form for the inhomogeneous solution. And in the case of this I would have to multiply through by t. Why is it valid if $\displaystyle \omega$ does not equal 1, despite the fact that sines and cosines are still present in the general homogeneous solution?

Also, if you wouldn't mind explaining where you got $\displaystyle x = (t + ct^2)(a \cos t + b \sin t)$ from it would be nice? Is it something that you just derived, or is it a rule of thumb?

Cheers.
• Oct 18th 2008, 08:17 PM
Hang on, I tried http://www.mathhelpforum.com/math-he...39d00ade-1.gif and was left with,

$\displaystyle a-a{\omega}^2=2$

$\displaystyle b-b{\omega}^2=0$

What did i do wrong?
• Oct 18th 2008, 08:24 PM
U-God
This is starting to confuse me :S

I think $\displaystyle x = acos(\omega t) + bsin(\omega t)$ will work despite it goes against what I was initially taught. And I can sort of accept that, but with the second form you gave:

$\displaystyle x = (t + ct^2)(a \cos t + b \sin t)$ why is there no omega in the sine and cosine functions?
I derived it and put it into x'' + x and got: $\displaystyle (2bc - 2a)sin(t) + (2ac + 2b)cos(t) - 4actsin(t) + 4bctcos(t)$

Where would I go from here?
Thanks
• Oct 18th 2008, 08:26 PM
U-God
Quote:

Hang on, I tried http://www.mathhelpforum.com/math-he...39d00ade-1.gif and was left with,

$\displaystyle a-a{\omega}^2=2$

$\displaystyle b-b{\omega}^2=0$

What did i do wrong?

I did that and got the same thing, and everything simplified very nicely. But someone whose opinion I respect pointed out that I cannot use that form if there are sines and cosines in the homogeneous general solution. So apparently it's incorrect.
• Oct 18th 2008, 08:41 PM
Quote:

Originally Posted by U-God
$\displaystyle x = (t + ct^2)(a \cos t + b \sin t)$ why is there no omega in the sine and cosine functions?

In this particular solution omega must equal one, that's why its not there
• Oct 18th 2008, 08:44 PM
U-God
Quote:

In this particular solution omega must equal one, that's why its not there

Wow! I swear I am getting dumber haha!!

Do you know why this is the form of the equation though?
• Oct 18th 2008, 08:52 PM
mr fantastic
Quote:

Originally Posted by U-God
Ok thanks for that,
However, I was taught that if a term is in the homogeneous general solution, you cannot use that term in your form for the inhomogeneous solution. And in the case of this I would have to multiply through by t. Why is it valid if $\displaystyle \omega$ does not equal 1, despite the fact that sines and cosines are still present in the general homogeneous solution?

Also, if you wouldn't mind explaining where you got $\displaystyle x = (t + ct^2)(a \cos t + b \sin t)$ from it would be nice? Is it something that you just derived, or is it a rule of thumb?

Cheers.

The sines and cosines in the general solution have a different period ( namely $\displaystyle \frac{2 \pi}{\omega}$ ) to that of $\displaystyle \cos t$ except when $\displaystyle \omega = 1$.

You should treat $\displaystyle \omega \neq 1$ and $\displaystyle \omega = 1$ as two seperate cases. Re-read post #3.

You've misunderstood the 'respected opinion', I think. But hopefully this thread has cleared things up.