MHB Logan's question at Yahoo Answers involving an IVP with a linear 1st order ODE

  • Thread starter Thread starter MarkFL
  • Start date Start date
  • Tags Tags
    Ivp Linear Ode
MarkFL
Gold Member
MHB
Messages
13,284
Reaction score
12
Here is the question:

Initial value problem?

2(dy/dx) - 4xy = 8x. y(0)=12

Help please

Here is a link to the question:

Initial value problem? - Yahoo! Answers

I have posted a link there to this topic so the OP can find my response.
 
Mathematics news on Phys.org
Hello Logan,

We are given the first order linear IVP to solve:

$$2\frac{dy}{dx}-4xy=8x$$ where $$y(0)=12$$

To find the general solution to the ODE, I would first divide through by 2 to obtain:

$$\frac{dy}{dx}-2xy=4x$$

Next, let's compute the integrating factor:

$$\mu(x)=e^{-2\int x\,dx}=e^{-x^2}$$ which gives us:

$$e^{-x^2}\frac{dy}{dx}-2xe^{-x^2}y=4xe^{-x^2}$$

Now we may rewrite the left side as the differentiation of a product:

$$\frac{d}{dx}\left(e^{-x^2}y \right)=4xe^{-x^2}$$

Integrate with respect to $x$:

$$\int\,d\left(e^{-x^2}y \right)=-2\int e^{-x^2}(-2x\,dx)$$

$$e^{-x^2}y=-2e^{-x^2}+C$$

Multiply through by $$e^{x^2}$$:

$$y(x)=-2+Ce^{x^2}$$

Now, use initial conditions to determine the parameter $C$:

$$y(0)=-2+Ce^{0^2}=12\implies C=14$$

and so the solution satisfying the IVP is:

$$y(x)=14e^{x^2}-2$$

To Logan and any other guests viewing this topic, I invite and encourage you to post other ODE problems in our http://www.mathhelpboards.com/f17/ forum.

Best Regards,

Mark.
 
Could you explain how you computed the integral factor some more? For example how did you know and come up with μ(x)=e−2∫xdx=e−x2 ?

Thanks
 
It is the standard method used to compute the integrating factor, which makes it possible to rewrite the left side as the product of a differentiation.

Consider the linear ODE in standard form:

$$\frac{dy}{dx}+P(x)y=Q(x)$$

Now, if we multiply through by the integrating factor $$\mu(x)=e^{\int P(x)\,dx}$$ we get:

$$e^{\int P(x)\,dx}\frac{dy}{dx}+e^{\int P(x)\,dx}P(x)y=e^{\int P(x)\,dx}Q(x)$$

Observe now that:

$$\frac{d}{dx}\left(e^{\int P(x)\,dx}y \right)=e^{\int P(x)\,dx}\frac{dy}{dx}+e^{\int P(x)\,dx}P(x)y$$

and so the ODE may be written:

$$\frac{d}{dx}\left(e^{\int P(x)\,dx}y \right)=e^{\int P(x)\,dx}Q(x)$$

Integrating with respect to $x$, we have:

$$\int\,d\left(e^{\int P(x)\,dx}y \right)=\int e^{\int P(x)\,dx}Q(x)\,dx$$

$$e^{\int P(x)\,dx}y=\int e^{\int P(x)\,dx}Q(x)\,dx$$

Solving for $y$, we obtain:

$$y(x)=e^{-\int P(x)\,dx}\int e^{\int P(x)\,dx}Q(x)\,dx$$
 
Ok so if its in this form
dydx+P(x)y=Q(x)

I will always compute the integral with
μ(x)=e∫P(x)dx ?

Or only then because of P(x) in the problem

Thanks so much!
 
LLand314 said:
Ok so if its in this form
dydx+P(x)y=Q(x)

I will always compute the integral with
μ(x)=e∫P(x)dx ?

Or only then because of P(x) in the problem

Thanks so much!

Without using $\LaTeX$, I would write the integrating factor as either:

μ(x)=exp(∫P(x)dx ) or μ(x)=e^(∫P(x)dx)

Yes, this is how it is computed because of the special nature of the derivative of the exponential function with $e$ as the base. Did you understand how it allows the left side of the ODE in standard linear form to be simplified as the derivative with respect to $x$ of the product $y(x)\cdot\mu(x)$?
 
MarkFL said:
Without using $\LaTeX$, I would write the integrating factor as either:

μ(x)=exp(∫P(x)dx ) or μ(x)=e^(∫P(x)dx)

Yes, this is how it is computed because of the special nature of the derivative of the exponential function with $e$ as the base. Did you understand how it allows the left side of the ODE in standard linear form to be simplified as the derivative with respect to $x$ of the product $y(x)\cdot\mu(x)$?
O ok sorry I just tried to copy and paste the information, I haven't learned Latex yet. I think I kind of understand it just need to do some more problems.

moderator edit: I have moved your new question into its own topic here:

http://www.mathhelpboards.com/f17/solving-first-order-linear-initial-value-problem-4051/
 
Last edited by a moderator:
Hey no worries, I was just showing you a better way to write the integrating factor, just for clarity. :D

I am happy you have registered and are participating here! (Yes)
 
Last edited:
Just in case you're wondering why the Integrating Factor is [math]\displaystyle e^{P(x)\,dx}[/math], let's look at a general first order linear DE in more detail...

[math]\frac{dy}{dx} + P\,y = Q[/math], where P, Q and y are functions of x.

What we would like is to write the LHS as a single derivative, because then we would be able to solve for y by integrating. To do this, we make use of the Product Rule [math]\displaystyle \frac{d}{dx} \left[ f\,g \right] = f\,\frac{dg}{dx} + g\,\frac{df}{dx}[/math]. At the moment, the LHS doesn't look like a product rule expansion, but it's possible to multiply by a function to make this so. Call this function I. Then

[math]I\,\frac{dy}{dx} + I\,P\,y = I\,Q[/math]

Now in order for the LHS to be a product rule expansion, then that would mean

[math] \begin{align*} \frac{dI}{dx} &= I\,P \\ \frac{1}{I}\,\frac{dI}{dx} &= P \\ \int{\frac{1}{I}\,\frac{dI}{dx}\,dx} &= \int{P\,dx} \\ \int{\frac{1}{I} \,dI } &= \int{P\,dx} \\ \ln{|I|} &= \int{P\,dx} \\ I &= A\,e^{\int{P\,dx}} \end{align*} [/math]

So any value of the constant A will give an integrating factor that works, so we usually just choose the principal value with A = 1. So if we multiply both sides of the DE by [math] \displaystyle e^{\int{P\,dx}}[/math] we find

[math]\displaystyle \begin{align*} e^{\int{P\,dx}}\,\frac{dy}{dx} + e^{\int{P\,dx}}\,P\,y &= e^{\int{P\,dx}}\,Q \\ \frac{d}{dx} \left( e^{\int{P\,dx}}\,y \right) &= e^{\int{P\,dx}}\,Q \\ e^{\int{P\,dx}}\,y &= \int{e^{\int{P\,dx}}\,Q\,dx} \\ y &= e^{-\int{P\,dx}}\int{e^{\int{P\,dx}}\,Q\,dx} \end{align*}[/math]

Hope that helps...
 
Back
Top