Solving a Non-Homogeneous Linear Differential Equation

  • Thread starter Thread starter Guineafowl
  • Start date Start date
Guineafowl
Messages
857
Reaction score
402
Homework Statement
Not homework, self-study.
Relevant Equations
##\frac{dI}{dt}+\frac{R}{L}I = \frac{V}{L} ## solve for I.
I’ve tried ##I=uv## and ##\frac{dI}{dt} = u\frac{dv}{dt} + v\frac{du}{dt}##
New thread started, as suggested:
Guineafowl said:
I wonder if anyone can help me follow this:
View attachment 314289

Kirchhoff’s law tells us that, around the circuit pictured, the jump in voltage across ##Vs## equals the drop ##IR + L\frac{dI}{dt}##.

They have rewritten the equation below that, and I’ve attempted follow their solution, having looked up how to do it.

To reiterate, I’m trying to solve this for ##I##:

##\frac{dI}{dt} + \frac{R}{L}I = \frac{V}{L}##

substituting ##I=uv## and ##\frac{dI}{dt} = u\frac{dv}{dt} + v\frac{du}{dt}## I get:

1) ##u\frac{dv}{dt} + v(\frac{du}{dt} + \frac{Ru}{L}) = \frac{V}{L}##

Setting the ##v## term to zero:

##\frac{du}{dt} = -\frac{Ru}{L}##

And solving for ##u## by substitution of variables:

##u = ke^{-\frac{Rt}{L}}##

Substituting ##u## into equation 1:

##ke^{-\frac{Rt}{L}}\frac{dv}{dt} = \frac{V}{L}##

Leaves ##dv## to calculate:

##\int dv = \frac{V}{kL} \int e^{\frac{Rt}{L}} dt##

##v=\frac{V}{kR} e^{\frac{Rt}{L}}##

Now, substituting ##I=uv##:

##I = uv = \frac{V}{R} e^{-\frac{Rt}{L}}e^{\frac{Rt}{L}}##

Which doesn’t work, of course.

The answer is meant to be:

##I = \frac{V}{R} (1-e^{\frac{-t}{L/R}})##

I looked up solving homogeneous linear first-order equations, and this one is non-homogeneous. Is that something to do with it? Or the mention of the current starting at zero?

Many thanks
 
Physics news on Phys.org
Guineafowl said:
I wonder if anyone can help me follow this:
View attachment 314289

Kirchhoff’s law tells us that, around the circuit pictured, the jump in voltage across ##Vs## equals the drop ##IR + L\frac{dI}{dt}##.

They have rewritten the equation below that, and I’ve attempted follow their solution, having looked up how to do it.

To reiterate, I’m trying to solve this for ##I##:

##\frac{dI}{dt} + \frac{R}{L}I = \frac{V}{L}##

substituting ##I=uv## and ##\frac{dI}{dt} = u\frac{dv}{dt} + v\frac{du}{dt}## I get:

1) ##u\frac{dv}{dt} + v(\frac{du}{dt} + \frac{Ru}{L}) = \frac{V}{L}##

Setting the ##v## term to zero:

##\frac{du}{dt} = -\frac{Ru}{L}##

And solving for ##u## by substitution of variables:

##u = ke^{-\frac{Rt}{L}}##

Substituting ##u## into equation 1:

##ke^{-\frac{Rt}{L}}\frac{dv}{dt} = \frac{V}{L}##

Leaves ##dv## to calculate:

##\int dv = \frac{V}{kL} \int e^{\frac{Rt}{L}} dt##

##v=\frac{V}{kR} e^{\frac{Rt}{L}}##

You forgot the constant of integration: <br /> v = C + \frac{V}{kR} e^{Rt/L} Hence <br /> uv = Cke^{-Rt/L} + \frac{V}{R}. You see now that the constant k was not necessary; you could have set it to be 1.
 
Last edited:
  • Like
Likes topsquark
Thanks. I can see how you got that, at least:
##\frac{dI}{dt} + \frac{R}{L}I = \frac{V}{L}## [multiply RHS by ##\frac{R}{R}##]

##\frac{dI}{dt} + \frac{R}{L}I = \frac{RV}{RL}##

##\frac{dI}{dt} = \frac{RV}{RL} - \frac{IR}{L}##

##\frac{dI}{dt} = \frac{R}{L}(\frac{V}{R}-I)##

##\frac{1}{\frac{V}{R}-I}\frac{dI}{dt} = \frac{R}{L}##

So my follow-on questions are: how did you know to do that, and how does it help? Can I now apply the ##I=uv## technique I found?I should add that my background is biological/medical, and last studied mathematics at 16, in 1998. I’ve never been taught calculus, just trying to follow the calculations in an electronics textbook for interest.
 
Last edited:
Is your answer:
pasmith said:
##uv = Cke^{-Rt/L} + \frac{V}{R}.##
The same as the textbook one, ie:

##I = \frac{V}{R}(1-e^{\frac{-t}{L/R}})##

Or, as I would have it:

##I = \frac{V}{R}(1-e^{\frac{-Rt}{L}})##?
 
Last edited:
Guineafowl said:
I’ve never been taught calculus, just trying to follow the calculations in an electronics textbook for interest.
That's going to be difficult without having studied calculus first. When you solve a differential equation, an equation will involve some sort of derivative, so you have to find an antiderivative (i.e., an integral) to find the solution.
 
  • Like
Likes topsquark
Mark44 said:
That's going to be difficult without having studied calculus first. When you solve a differential equation, an equation will involve some sort of derivative, so you have to find an antiderivative (i.e., an integral) to find the solution.
I have studied a little, eg Essential Calculus Skills by Chris McMullen. A brief guide to each form of calculus, followed by lots of examples and answers.

Very much a ‘mathematician’s approach’ (rather dry), where divining that ##\frac{d}{dx}x^2 = 2x## is the only goal, whereas I prefer a more practical approach, such as the minimum time problem.

However, it only deals with differentiating/integrating functions, not how to solve differential equations as above. I got that from a website.
 
Guineafowl said:
Very much a ‘mathematician’s approach’ (rather dry), where divining that ##\frac{d}{dx}x^2 = 2x## is the only goal, whereas I prefer a more practical approach, such as the minimum time problem.

However, it only deals with differentiating/integrating functions, not how to solve differential equations as above. I got that from a website.
I wouldn't describe the minimum time problem as "a more practical approach." It's an application of differentiation. In order to be able to work with such applications, you need to have an appropriate set of tools to work with. IOW, you need a set of differentiation rules. The power rule of your example is one of the simpler differentiation rules. Other rules include the product rule, quotient rule, and so on. You need to crawl before you walk, and to walk before you run.

Once you have a set of differentiation rules at your disposal, you can choose the most appropriate one for applications such as minimum time, related rates problems, and so on.

Similarly, if you want to solve differential equations, you need to have a variety of antidifferentiation rules in hand.
 
Last edited:
  • Like
Likes topsquark
Fair enough. Now, let me try again:

##\frac{du}{dt} = \frac{-Ru}{L}##

##\int\frac{du}{u} = \frac{-R}{L}\int{dt}##

##ln(u) + a = \frac{-Rt}{L} + b##
Where ##a## and ##b## are constants of integration.
Or

##ln(u) = \frac{-Rt}{L} + c##
Where ##c## combines ##a## and ##b##.

##u = e^{-Rt/L} + e^c##

... which I have rendered as ##u = ke^{-Rt/L}##

Is there a mistake there? Eg, should I have not done the last step?
 
Last edited:
Guineafowl said:
Fair enough. Now, let me try again:

##\frac{du}{dt} = \frac{-Ru}{L}##

##\int\frac{du}{u} = \frac{-R}{L}\int{dt}##

##ln(u) + a = \frac{-Rt}{L} + b##
Where ##a## and ##b## are constants of integration.
Or
You only need one constant of integration, ##c = b-a## as you have below.
##ln(u) = \frac{-Rt}{L} + c##
Where ##c## combines ##a## and ##b##.

##u = e^{-Rt/L} + e^c##
That is not correct.

Should be ##\ u = e^{-Rt/L +c} = e^c \, e^{-Rt/L}##

... which I have rendered as ##u = ke^{-Rt/L}##

Is there a mistake there? Eg, should I have not done the last step?
 
  • Like
Likes topsquark
  • #10
So, we’re happy with ##u = ke^{-Rt/L}##, with ##k=e^c##?

I’ll substitute that in to:
##u\frac{dv}{dt} = \frac{V}{L}##

To give:
##ke^{-Rt/L}\frac{dv}{dt} = \frac{V}{L}##

##\int{dv} = \frac{V}{kL}\int e^{Rt/L}dt##

##v = \frac{V}{kR}e^{Rt/L} + C##
 
  • #11
##uv = ke^{-Rt/L}(\frac{V}{kR}e^{Rt/L} + C)##

Bear with me:
##uv = \frac{k}{k}\frac{V}{R}e^{-Rt/L}e^{Rt/L} + Cke^{-Rt/L}##

##I = \frac{V}{R} + Cke^{-Rt/L}##

So I’ve finally got the same as you, but as far as I can see, this isn’t the answer in the book:

##I = \frac{V}{R}(1-e^{-Rt/L})##
 
  • #12
Guineafowl said:
So I’ve finally got the same as you, but as far as I can see, this isn’t the answer in the book: ##I = \frac{V}{R}(1-e^{-Rt/L})##
From what I can tell of the image you posted, this is an initial value problem. IOW, a differential equation with an initial condition.
In your work above you found the general solution to the DE To finish it off, substitute in your initial condition, which is I(0) = 0.
 
  • Like
Likes topsquark
  • #13
Ok, so at ##I = 0## and ##t = 0##:

##\frac{V}{R} + Cke^{-R0/L} = 0##

##\frac{V}{R} = -Ck##

And substituting ##Ck = -\frac{V}{R}## back in:

##I = \frac{V}{R} - \frac{V}{R}e^{-Rt/L}##

Or, finally:

##I = \frac{V}{R}(1-e^{-Rt/L})##

Just like magic! Thanks for everyone’s help.
 
Back
Top