Assistance needed for this ODE problem

  • Context: MHB 
  • Thread starter Thread starter heaviside
  • Start date Start date
  • Tags Tags
    Assistance Ode
Click For Summary

Discussion Overview

The discussion revolves around solving a first-order ordinary differential equation (ODE) as presented in a problem from Boyce & DiPrima's Elementary Differential Equations. Participants explore the method of variation of parameters, focusing on the integration steps and the derivation of a specific solution.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Homework-related

Main Points Raised

  • Heaviside presents the problem and outlines their approach, including integration by parts to derive A(x) and subsequently y.
  • Heaviside identifies a discrepancy in their final expression for y, noting that they obtained g'(x) instead of g(x) when comparing to the expected solution.
  • Ackbach points out a potential error in Heaviside's integration by parts setup, suggesting that the differential must be consistent on both sides of the equation.
  • Ackbach encourages Heaviside to propagate the correction through their derivations to check for consistency.
  • Heaviside later confirms that after applying Ackbach's suggestion, the solution was successfully obtained.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the initial approach, but there is agreement on the correction suggested by Ackbach, which leads to a successful resolution of the problem.

Contextual Notes

There are unresolved assumptions regarding the integration steps and the application of integration by parts, which may affect the derivation of the solution.

heaviside
Messages
2
Reaction score
0
Hi,The problem I am trying to solve is in a section on first order ODEs. It is problem 25 in section 2.1 of Boyce & DiPrima's Elementary Diff Eq (5th Ed). The problem serves as an introduction to the variation of parameters, but again, it is in the first section of the book that introduces first order ODEs.

Find A(x) from (i). Then substitute for A(x) in (ii). Verify that the solution verifies with (iii).

(i)
[math]
A'(x) = g(x) \exp \lbrack \int p(x)\,dx \rbrack
[/math]

(ii)
[math]
y = A(x) \exp \lbrack -\int p(x)\,dx \rbrack
[/math]

(iii)
[math]
y = \frac{\int \mu(x)g(x)dx + c}{\mu(x)}
[/math]

This is what I have so far:

Integrate (by parts) equation (i):
[math]
\int udv = uv-\int vdu
[/math]
Let
[math] u = \exp \lbrack \int p(x)\,dx \rbrack [/math]
[math] du = p(x) \exp \lbrack \int p(x)\,dx \rbrack [/math]
[math] v = g(x) [/math]
[math] dv=g'(x) [/math]

This yields:
[math]
A(x)=g(x) \exp \lbrack \int p(x)\,dx \rbrack - \int g(x)p(x) \exp \lbrack \int p(x)\,dx \rbrack dx
[/math]

Putting this into equation (ii), yields:
[math]
y = \lgroup g(x) \exp \lbrack \int p(x)\,dx \rbrack - \int g(x)p(x) \exp \lbrack \int p(x)\,dx \rbrack dx \rgroup \bullet \exp \lbrack - \int p(x)\,dx \rbrack
[/math]
and thus (iv)
[math]
y = g(x) - \lgroup \int g(x)p(x) \exp \lbrack \int p(x)\,dx \rbrack dx \rgroup \bullet \exp \lbrack - \int p(x)\,dx \rbrack
[/math]

Now, I perform integration by parts again on the term in round brackets above:
Let
[math] u = g(x) [/math]
[math] du = g'(x)[/math]
[math] v = \exp \lbrack \int p(x)\,dx \rbrack [/math]
[math] dv = p(x) \exp \lbrack \int p(x)\,dx \rbrack [/math]

This yields:
[math]
g(x)\exp \lbrack \int p(x)\,dx \rbrack - \int g'(x) \exp \lbrack \int p(x)\,dx \rbrack dx
[/math]

Now (iv) becomes
[math]
y = g(x) - \lgroup g(x)\exp \lbrack \int p(x)\,dx \rbrack - \int g'(x) \exp \lbrack \int p(x)\,dx \rbrack dx \rgroup \exp \lbrack - \int p(x)\,dx \rbrack
[/math]
Simplifying:
[math]
y = \frac{\int g'(x)\exp \lbrack \int p(x)\,dx \rbrack dx}{\exp \lbrack \int p(x)\,dx \rbrack}
[/math]

Now the book defines
[math]
\mu(x) = \exp \lbrack \int p(x)\,dx \rbrack
[/math]

Therefore, what I have is:
[math]
y=\frac{\int \mu(x)g'(x)dx + c}{\mu(x)}
[/math]

Compare this to (iii) - you will see I have [math]g'(x)[/math] instead of [math]g(x)[/math].

So my question is: where did I go wrong. I've been looking over this for hours.

Thanks,
heaviside
 
Physics news on Phys.org
Re: Assistance needed for this ODE problame

heaviside said:
Hi,The problem I am trying to solve is in a section on first order ODEs. It is problem 25 in section 2.1 of Boyce & DiPrima's Elementary Diff Eq (5th Ed). The problem serves as an introduction to the variation of parameters, but again, it is in the first section of the book that introduces first order ODEs.

Find A(x) from (i). Then substitute for A(x) in (ii). Verify that the solution verifies with (iii).

(i)
[math]
A'(x) = g(x) \exp \lbrack \int p(x)\,dx \rbrack
[/math]

(ii)
[math]
y = A(x) \exp \lbrack -\int p(x)\,dx \rbrack
[/math]

(iii)
[math]
y = \frac{\int \mu(x)g(x)dx + c}{\mu(x)}
[/math]

This is what I have so far:

Integrate (by parts) equation (i):
[math]
\int udv = uv-\int vdu
[/math]
Let
[math] u = \exp \lbrack \int p(x)\,dx \rbrack [/math]
[math] du = p(x) \exp \lbrack \int p(x)\,dx \rbrack [/math]
[math] v = g(x) [/math]
[math] dv=g'(x) [/math]

I'm assuming you meant $dv = g'(x) \, dx$. Remember the Golden Rule of Differentials: if you have a differential on one side of an equation, you must have a differential on the other side as well.

This is not what you have in your integral. For by-parts, the integral you start with has to be the $\displaystyle \int u \, dv$. So you're saying, by setting up the by-parts this way, that your original integral is $\displaystyle \int g'(x) e^{ \int p(x) \, dx} \, dx$. But it isn't. Your original integral is $\displaystyle \int g(x) e^{ \int p(x) \, dx} \, dx$.

Try propagating this correction through your derivations, and see if it comes out right.

This yields:
[math]
A(x)=g(x) \exp \lbrack \int p(x)\,dx \rbrack - \int g(x)p(x) \exp \lbrack \int p(x)\,dx \rbrack dx
[/math]

Putting this into equation (ii), yields:
[math]
y = \lgroup g(x) \exp \lbrack \int p(x)\,dx \rbrack - \int g(x)p(x) \exp \lbrack \int p(x)\,dx \rbrack dx \rgroup \bullet \exp \lbrack - \int p(x)\,dx \rbrack
[/math]
and thus (iv)
[math]
y = g(x) - \lgroup \int g(x)p(x) \exp \lbrack \int p(x)\,dx \rbrack dx \rgroup \bullet \exp \lbrack - \int p(x)\,dx \rbrack
[/math]

Now, I perform integration by parts again on the term in round brackets above:
Let
[math] u = g(x) [/math]
[math] du = g'(x)[/math]
[math] v = \exp \lbrack \int p(x)\,dx \rbrack [/math]
[math] dv = p(x) \exp \lbrack \int p(x)\,dx \rbrack [/math]

This yields:
[math]
g(x)\exp \lbrack \int p(x)\,dx \rbrack - \int g'(x) \exp \lbrack \int p(x)\,dx \rbrack dx
[/math]

Now (iv) becomes
[math]
y = g(x) - \lgroup g(x)\exp \lbrack \int p(x)\,dx \rbrack - \int g'(x) \exp \lbrack \int p(x)\,dx \rbrack dx \rgroup \exp \lbrack - \int p(x)\,dx \rbrack
[/math]
Simplifying:
[math]
y = \frac{\int g'(x)\exp \lbrack \int p(x)\,dx \rbrack dx}{\exp \lbrack \int p(x)\,dx \rbrack}
[/math]

Now the book defines
[math]
\mu(x) = \exp \lbrack \int p(x)\,dx \rbrack
[/math]

Therefore, what I have is:
[math]
y=\frac{\int \mu(x)g'(x)dx + c}{\mu(x)}
[/math]

Compare this to (iii) - you will see I have [math]g'(x)[/math] instead of [math]g(x)[/math].

So my question is: where did I go wrong. I've been looking over this for hours.

Thanks,
heaviside
 
That's it!

I just went through it again, with the change you suggested, and with more care. And the solution came out.

Thank you Ackbach!
 
heaviside said:
That's it!

I just went through it again, with the change you suggested, and with more care. And the solution came out.

Thank you Ackbach!

You're very welcome! Have a good one.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K