Solving a nonhomogeneous 2nd order ode

Click For Summary

Homework Help Overview

The discussion revolves around solving a nonhomogeneous second-order ordinary differential equation (ODE) of the form \( u''(x) + 4u(x) = \cos(2x) \) with initial conditions \( u(0) = u'(0) = 1 \). Participants are exploring methods to find both the homogeneous and particular solutions to this equation.

Discussion Character

  • Exploratory, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • Participants discuss the method of undetermined coefficients to find a particular solution, initially suggesting a trial solution of the form \( u(x) = x(A\cos(2x) + B\sin(2x)) \). There are questions about the correctness of the differentiation process and the resulting coefficients.

Discussion Status

Some participants have provided feedback on the calculations, indicating that the particular solution derived may not be correct. There is an ongoing exploration of the correct coefficients and the form of the particular solution, with one participant indicating a revised calculation that seems to yield a different result.

Contextual Notes

There is mention of checking calculations with software (Maple), and participants are reflecting on potential errors in their previous attempts. The discussion includes a light-hearted acknowledgment of mistakes made during the substitution process.

Iacha
Messages
3
Reaction score
0
Hi, everyone! This is my first post here, I need an hand with this equation!

Homework Statement


Solve the initial value problem:

\begin{equation}
\begin{cases}
u''(x)+4u(x)=\cos(2x)
\\u(0)=u'(0)=1
\end{cases}
\end{equation}

The Attempt at a Solution


I started by solving the associated homogeneous linear equation \begin{equation} u''(x)+4u(x)=0\end{equation} by the usual method of substituting the trial solution \begin{equation} u(x)=e^{\lambda x} \end{equation}.
One obtains \begin{equation}\begin{aligned} &\lambda^2+4=0 \\ &\lambda = \pm 2i \\ &u(x)=C_1\cos(2x)+C_2\sin(2x)\end{aligned}\end{equation}

To find the particular solution I use the method of undetermined coefficients with \begin{equation}u(x)_p=x(A\cos(2x)+B\sin(2x)). \end{equation}
Differentiating and substituting back in the ODE I get \begin{equation} u(x)_p=\frac{1}{4}\cos(2x)\end{equation} which is not good. I don't think I made some mistakes in the differentiation process since I checked my calculations with Maple.
 
Physics news on Phys.org
Iacha said:
Hi, everyone! This is my first post here, I need an hand with this equation!

Homework Statement


Solve the initial value problem:

\begin{equation}
\begin{cases}
u''(x)+4u(x)=\cos(2x)
\\u(0)=u'(0)=1
\end{cases}
\end{equation}

The Attempt at a Solution


I started by solving the associated homogeneous linear equation \begin{equation} u''(x)+4u(x)=0\end{equation} by the usual method of substituting the trial solution \begin{equation} u(x)=e^{\lambda x} \end{equation}.
One obtains \begin{equation}\begin{aligned} &\lambda^2+4=0 \\ &\lambda = \pm 2i \\ &u(x)=C_1\cos(2x)+C_2\sin(2x)\end{aligned}\end{equation}

To find the particular solution I use the method of undetermined coefficients with \begin{equation}u(x)_p=x(A\cos(2x)+B\sin(2x)). \end{equation}
Differentiating and substituting back in the ODE I get \begin{equation} u(x)_p=\frac{1}{4}\cos(2x)\end{equation} which is not good. I don't think I made some mistakes in the differentiation process since I checked my calculations with Maple.

Welcome to PF!
Your particular solution is not correct. First, it should contain the factor x. Show please, how you arrived to the result A=1/4 B=0.

ehild
 
Last edited:
I did again the calculation and this time I think I got it right,
Starting from the test solution:
\begin{equation}u(x)=x(A\cos(2x)+B\sin(2x))\end{equation}
by applying the usual rules of differentiation one obtains:
\begin{equation}u(x)''= 0(A\cos(2x)+B\sin(2x)) + 2(-2Asin(2x)+2B\cos(2x))+x( -4A\cos(2x)-4B\sin(2x))\end{equation}
which is
\begin{equation}u(x)''=-4A\sin(2x)+4B\cos(2x)+x(-4A\cos(2x)-4B\sin(2x))\end{equation}

Now, putting this back into the original equation \begin{equation} u(x)''+4u(x)=cos(2x) \end{equation} yelds
\begin{equation} -4A\sin(2x)+4B\cos(2x)-4x(A\cos(2x)+B\sin(2x))+4x(A\cos(2x)+B\sin(2x))= cos(2x)\end{equation}
Simplifying:
\begin{equation} -4A\sin(2x)+4B\cos(2x)=cos(2x)\end{equation}
I obtained \begin{equation} A=0 B=1/4 \end{equation}

So what I get from the calculation is \begin{equation} u(x)=x(\frac{1}{4}\sin(2x))\end{equation} which is a particular solution for the ODE, now one can write the general solution in the form:
\begin{equation} u(x)=C_1\cos(2x)+C_2\sin(2x)+x(\frac{1}{4}\sin(2x))\end{equation}

Appereantly yesterday I substituted back the parameters in the wrong expression. :redface:
 
Iacha said:
Appereantly yesterday I substituted back the parameters in the wrong expression. :redface:

Or you incorrectly substituted back the parameters in the expression :biggrin:

ehild
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
8
Views
1K
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
8
Views
1K
Replies
3
Views
2K