Solving a Non-Homogeneous Linear Differential Equation

  • Thread starter Guineafowl
  • Start date
In summary, Kirchhoff’s law states that the voltage jump across a circuit equals the drop in voltage. This can be rewritten as a differential equation, which can be solved using the substitution method. However, this method requires a constant of integration, which was not initially included in the solution. Once the constant is included, the correct solution for the current is given.
  • #1
Guineafowl
796
387
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
  • #2
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: [tex]
v = C + \frac{V}{kR} e^{Rt/L}[/tex] Hence [tex]
uv = Cke^{-Rt/L} + \frac{V}{R}.[/tex] You see now that the constant [itex]k[/itex] was not necessary; you could have set it to be 1.
 
Last edited:
  • Like
Likes topsquark
  • #3
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:
  • #4
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:
  • #5
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
  • #6
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.
 
  • #7
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
  • #8
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:
  • #9
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.
 

FAQ: Solving a Non-Homogeneous Linear Differential Equation

What is a non-homogeneous LDE?

A non-homogeneous LDE (linear differential equation) is an equation that involves a function and its derivatives, where the coefficients of the derivatives are not all constant. It is called "non-homogeneous" because it includes a non-zero function on the right side of the equation, as opposed to a homogeneous LDE where the right side is equal to zero.

How do you solve a non-homogeneous LDE?

To solve a non-homogeneous LDE, you can use the method of undetermined coefficients or variation of parameters. In the method of undetermined coefficients, you assume a particular solution based on the form of the non-homogeneous term and then solve for the coefficients. In variation of parameters, you find a general solution to the associated homogeneous LDE and then use it to find a particular solution.

What is the difference between a homogeneous and non-homogeneous LDE?

The main difference between a homogeneous and non-homogeneous LDE is the presence of a non-zero function on the right side of the equation. In a homogeneous LDE, the right side is always equal to zero, while in a non-homogeneous LDE, the right side can be any non-zero function. This difference affects the methods used to solve these types of equations.

Can a non-homogeneous LDE have a unique solution?

Yes, a non-homogeneous LDE can have a unique solution. This is because the general solution to a non-homogeneous LDE includes a particular solution and the general solution to the associated homogeneous LDE. The particular solution can be unique, resulting in a unique solution to the non-homogeneous LDE.

What are some real-world applications of solving non-homogeneous LDEs?

Non-homogeneous LDEs are commonly used in physics, engineering, and other scientific fields to model real-world phenomena. Some examples include modeling the motion of a pendulum, the growth of a population, and the flow of electricity in a circuit. Solving these equations can help predict and understand the behavior of these systems.

Back
Top