Second Order Nonhomogeneous Equation

• May 6th 2011, 06:03 AM
Nguyen
Second Order Nonhomogeneous Equation
Hey everyone, I need help understanding solving this equation as it deals with an input function that is discontinuous, which I don't know how to handle.

$g(x) =sin x$ for $0 \le x \le \frac{\pi}{2}$
$g(x)=0$ for $x > \frac{\pi}{2}$
Solve $y''+4y=g(x)$

The two intervals:
$y'' +4y = sin (x)$ for $0 \le x \le \frac{\pi}{2}$

and

$y'' +4y = 0$ for $x > \frac{\pi}{2}$

with $y(0)= 1$ and $y'(0)=2$

Can anyone help me?

Thanks
• May 6th 2011, 06:51 AM
Prove It
• May 6th 2011, 07:15 AM
bugatti79
Quote:

Originally Posted by Prove It
Solve the homogeneous equation http://quicklatex.com/cache3/ql_ae3a...765eaaf_l3.png.

It has characteristic equation http://quicklatex.com/cache3/ql_1378...8f9c350_l3.png, which has solution http://quicklatex.com/cache3/ql_18f0...b29dce9_l3.png.

From this, we can determine that the solution to the homogeneous DE is http://quicklatex.com/cache3/ql_8dbf...aa5143a_l3.png. This is also the entire solution when http://quicklatex.com/cache3/ql_cf75...7b7f884_l3.png.

May I ask how do you know this is the entire solution when you dont know A and B at this stage?
• May 6th 2011, 07:30 AM
Prove It
Because g(x) = 0 when x > pi/2, which means the DE is homogeneous in that domain.
• May 6th 2011, 08:05 AM
TheEmptySet
Quote:

Originally Posted by Nguyen
Hey everyone, I need help understanding solving this equation as it deals with an input function that is discontinuous, which I don't know how to handle.

$g(x) =sin x$ for $0 \le x \le \frac{\pi}{2}$
$g(x)=0$ for $x > \frac{\pi}{2}$
Solve $y''+4y=g(x)$

The two intervals:
$y'' +4y = sin (x)$ for $0 \le x \le \frac{\pi}{2}$

and

$y'' +4y = 0$ for $x > \frac{\pi}{2}$

with $y(0)= 1$ and $y'(0)=2$

Can anyone help me?

Thanks

Since this is an IVP an alternative is to use the Laplace transform to solve note that

$\sin(x)=\cos\left( x-\frac{\pi}{2}\right)$

So the right hand side can be written as

$g(x)=\sin(x)-u\left(x-\frac{\pi}{2} \right)\cos\left( x-\frac{\pi}{2}\right)$

and this has Laplace transform

$G(s)=\frac{1}{s^2+1}-e^{-\frac{\pi}{2}s}\cdot \frac{s}{s^2+1}$
• May 6th 2011, 06:00 PM
Nguyen
Thanks Prove It and TheEmptySet, I did the question the same way as Prove It but crossed it out becuase I didn't know how to deal with g(x) being discontinuous.

I got y= 5/6 sin(2x) +cos(2x)+1/3 sin(x)
• May 7th 2011, 06:22 AM
topsquark
Quote:

Originally Posted by Nguyen
Thanks Prove It and TheEmptySet, I did the question the same way as Prove It but crossed it out becuase I didn't know how to deal with g(x) being discontinuous.

I got y= 5/6 sin(2x) +cos(2x)+1/3 sin(x)

Prove It's method was simply telling you to do the problem over two domains. Not that complicated! I'd recommend learning to do it that way. It's good practice.

-Dan