Solving a nonhomogeneous 2nd order ode

In summary, the student is seeking help with solving an initial value problem involving a second-order differential equation. They have started by solving the associated homogeneous equation and have used the method of undetermined coefficients to find a particular solution. However, they have made a mistake in the differentiation process and received an incorrect particular solution. Upon further calculation, they have corrected their mistake and obtained the correct particular solution.
  • #1
Iacha
3
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
  • #2
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:
  • #3
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:
 
  • #4
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
 

1. What is a nonhomogeneous 2nd order ode?

A nonhomogeneous 2nd order ode (ordinary differential equation) is a mathematical equation that involves a second derivative of a function, with at least one term that is not proportional to the function itself. This means that the equation cannot be solved using standard methods for homogeneous equations.

2. How do I determine if an ode is nonhomogeneous?

An ode is nonhomogeneous if it contains a term that is not proportional to the function itself. This can be identified by looking at the coefficients of the terms in the equation. If any of the coefficients are not constant or are functions of the independent variable, then the ode is nonhomogeneous.

3. What is the general solution for a nonhomogeneous 2nd order ode?

The general solution for a nonhomogeneous 2nd order ode is a combination of the complementary function (solution to the corresponding homogeneous equation) and a particular solution (specific solution to the nonhomogeneous term). This can be expressed as y = yc + yp, where yc is the complementary function and yp is the particular solution.

4. How do I find the complementary function for a nonhomogeneous 2nd order ode?

The complementary function can be found by solving the corresponding homogeneous equation, which is obtained by setting all nonhomogeneous terms to zero. This can be solved using standard methods for homogeneous equations, such as the characteristic equation or undetermined coefficients method.

5. What methods can be used to find the particular solution for a nonhomogeneous 2nd order ode?

There are several methods that can be used to find the particular solution for a nonhomogeneous 2nd order ode, including the method of variation of parameters, the method of undetermined coefficients, and the method of annihilators. The choice of method depends on the form of the nonhomogeneous term in the equation.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
224
  • Calculus and Beyond Homework Help
Replies
3
Views
814
  • Calculus and Beyond Homework Help
Replies
4
Views
493
  • Calculus and Beyond Homework Help
Replies
6
Views
290
  • Calculus and Beyond Homework Help
Replies
1
Views
702
  • Calculus and Beyond Homework Help
Replies
14
Views
385
  • Calculus and Beyond Homework Help
Replies
2
Views
361
  • Calculus and Beyond Homework Help
Replies
3
Views
324
  • Calculus and Beyond Homework Help
Replies
17
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
471
Back
Top