Can an integral that is a variable of itself be solved analytically?

  • Thread starter Thread starter kmarinas86
  • Start date Start date
  • Tags Tags
    Integral Variable
kmarinas86
Messages
974
Reaction score
1
Almost two months ago I posted the following question:
kmarinas86 said:
Under the assumption that the voltage is V_f\left(1-e^{-\frac{t}{RC}}\right), where V_f is the final voltage, how would I determine the relationship between current I and time t?

I = \int_0^T \frac{V_f\left(1-e^{-\frac{t}{RC}}\right) - RI}{L} \,dt \,

L the magnetic inductance, R the resistance, and C the capacitance, are constants.

How would I plot current I as a function of time t? (The only variables here are I and t.) Let's assume initial conditions of I=0 and t=0. My problem here is that the variable I am trying to calculate is a variable inside the integral that is used in deriving the variable itself! How are such problems handled? Any help is appreciated! :smile:

I probably wasn't specific enough in my question to really get the answer I wanted. So I now ask, "Can an integral that is a variable of itself be solved analytically?"
 
Last edited:
Physics news on Phys.org
If:
I=\int f(I)dt
(where I is a function of t)

Then:
\frac{dI}{dt}=f(I)

... will have the same solution for I.

Which is 1st order non-linear.
So you will have analytic solutions under the same conditions.

(note: differentiating both sides was suggested in your original post.)
 
Simon Bridge said:
If:
I=\int f(I)dt
(where I is a function of t)

Then:
\frac{dI}{dt}=f(I)

... will have the same solution for I.

Which is 1st order non-linear.
So you will have analytic solutions under the same conditions.

(note: differentiating both sides was suggested in your original post.)

I guess what I want is an algebraic solution. Let's try this now:

kmarinas86 said:
Under the assumption that the voltage is V_f\left(1-e^{-\frac{t}{RC}}\right), where V_f is the final voltage, how would I determine the relationship between current I and time t?

I = \int_0^T \frac{V_f\left(1-e^{-\frac{t}{RC}}\right) - RI}{L} \,dt \,

L the magnetic inductance, R the resistance, and C the capacitance, are constants.

How would I plot current I as a function of time t? (The only variables here are I and t.) Let's assume initial conditions of I=0 and t=0. My problem here is that the variable I am trying to calculate is a variable inside the integral that is used in deriving the variable itself! How are such problems handled? Any help is appreciated! :smile:

\frac{dI}{dt} = \frac{V_f \left(1-e^{-\frac{t}{RC}}\right) - RI}{L}

L\frac{dI}{dt} = V_f\left(1-e^{-\frac{t}{RC}}\right) - RI
RI = V_f\left(1-e^{-\frac{t}{RC}}\right)-L\frac{dI}{dt}
I = \frac{V_f\left(1-e^{-\frac{t}{RC}}\right)-L\frac{dI}{dt}}{R}

Now the problem is, "What is \frac{dI}{dt}?" I already had defined it in terms of I. Now I am simply back where I started. I just swapped the terms, and I still don't see a closed-form solution.
 
Simon Bridge said:
If:
I=\int f(I)dt
(where I is a function of t)

Then:
\frac{dI}{dt}=f(I)

Your notation could be confusing. Without the limits someone might think you are differentiating with respect to the dummy integration variable, which would not be good. You should write

If

I(t) = \int_0^t dt' f(I(t'),t'),

then

\frac{dI(t)}{dt} = f(I(t),t).

(I added an extra argument for t on its own, since it depends on t separately too).

kmarinas86 said:
I guess what I want is an algebraic solution. Let's try this now:

\frac{dI}{dt} = \frac{V_f \left(1-e^{-\frac{t}{RC}}\right) - RI}{L}

L\frac{dI}{dt} = V_f\left(1-e^{-\frac{t}{RC}}\right) - RI
RI = V_f\left(1-e^{-\frac{t}{RC}}\right)-L\frac{dI}{dt}
I = \frac{V_f\left(1-e^{-\frac{t}{RC}}\right)-L\frac{dI}{dt}}{R}

Now the problem is, "What is \frac{dI}{dt}?" I already had defined it in terms of I. Now I am simply back where I started. I just swapped the terms, and I still don't see a closed-form solution.

Do you know what a differential equation is? Do you know how to solve one? Your equation is relatively simple and can be solved with an integrating factor. See here.
 
I suggest you look at easier ones first. See, "A First Course in Integral Equations" by Abdul-Majid Wazwas. No, I'm not kidding. That is his name. Don't make fun. Start with this one:

I(t)=\int_0^t k\left(1-e^{-x/c}\right) I(x)dx

Now differentiate:

\frac{dI}{dt}=k\left(1-e^{-t/c}\right)I(t)

separate variables:

\frac{dI}{I}=k\left(1-e^{-t/c}\right) dt

integrate:

\int_{I_0}^I \frac{dI}{I}=k\int_{t_0}^{t} \left(1-e^{-t/c}\right)dt

\ln(I)-\ln(I_0)=k\left(t+ce^{-t/c}\right)_{t_0}^t

Do all that and I get:

I(t)=I_0\exp\left\{k[(t+ce^{-t/c})-(t_0+ce^{-t_0/c})]\right\}
 
kmarinas86 said:
I guess what I want is an algebraic solution
The differential equation does yield an algebraic solution. It's the first step.
Especially as in your case f(I)=RI/L

@Mute: Yes I noticed that and was concerned - now you've pointed it out I can relax :) OP seems not to understand the differential equation.

Semi walk-through:

OPs integral is of the form

y(x)=\int f(x).dx - \int ay(x).dx
... and only the second term is causing trouble.
Focussing on the problematic term - differentiate both sides:

\frac{dy}{dx}=ay

...rearrange and integrate both sides:

\int \frac{dy}{y}=a\int dx

which yields:

\ln{|y|}=ax+c
... where c is the constant of integration - the actual problem has definite integrals so apply limits. Anyway - need to make y the subject so we take the natural exponent of both sides.

y=Ce^{ax}
... where C=ec

... so what did I miss?

Of course, it may be more like:

I=\frac{R}{L}\int_0^T i(t)dt
... which is to say the integral is expected to turn out a single number, rather than:

I=\frac{R}{L}\int_0^t i(t^\prime)dt^\prime
... but I don't want to make it too easy :)
[between this and #5, it should be easy.]
 
jackmell said:
I suggest you look at easier ones first. See, "A First Course in Integral Equations" by Abdul-Majid Wazwas. No, I'm not kidding. That is his name. Don't make fun. Start with this one:

I(t)=\int_0^t k\left(1-e^{-x/c}\right) I(x)dx

Now differentiate:

\frac{dI}{dt}=k\left(1-e^{-t/c}\right)I(t)

separate variables:

\frac{dI}{I}=k\left(1-e^{-t/c}\right) dt

integrate:

\int_{I_0}^I \frac{dI}{I}=k\int_{t_0}^{t} \left(1-e^{-t/c}\right)dt

\ln(I)-\ln(I_0)=k\left(t+ce^{-t/c}\right)_{t_0}^t

Do all that and I get:

I(t)=I_0\exp\left\{k[(t+ce^{-t/c})-(t_0+ce^{-t_0/c})]\right\}

It appears that one can go from:

\ln(I)-\ln(I_0)=k\left(t+ce^{-t/c}\right)_{t_0}^t

to

\ln(I)=\ln(I_0)+k\left(t+ce^{-t/c}\right)_{t_0}^t

to

I(t)=I_0\exp\left\{k[(t+ce^{-t/c})-(t_0+ce^{-t_0/c})]\right\}

Now I see why that is (Answer: Logarithm of the product gives us the sum of the logarithm of the factors). I just didn't know how to recognize starting with the sum of the logarithms first (i.e. Sum of the logarithm of the factors gives the logarithm of the product).

Whoops! said:
If I start with:

I(t)=I_0\exp\left\{k[(t+ce^{-t/c})-(t_0+ce^{-t_0/c})]\right\}

And then work backwards, then I get:

I(t)-I_0=\exp\left\{k[(t+ce^{-t/c})-(t_0+ce^{-t_0/c})]\right\} [hindsight 20/20: WTF?]
ln(I(t)-I_0)=k[(t+ce^{-t/c})-(t_0+ce^{-t_0/c})]
ln(I(t)-I_0)=k\left(t+ce^{-t/c}\right)_{t_0}^t

Yet you had:

\ln(I)-\ln(I_0)=k\left(t+ce^{-t/c}\right)_{t_0}^t

Which is clearly not the same thing.
 
Last edited:
kmarinas86 said:
If I start with:

I(t)=I_0\exp\left\{k[(t+ce^{-t/c})-(t_0+ce^{-t_0/c})]\right\}

And then work backwards, then I get:

I(t)-I_0=\exp\left\{k[(t+ce^{-t/c})-(t_0+ce^{-t_0/c})]\right\}

That's not correct. You'd have to take log of both sides first as in:

\log(I(t))=\log(I_0)+k[(t+ce^{-t/c})-(t_0+ce^{-t_0/c})
 
Simon Bridge said:
The differential equation does yield an algebraic solution. It's the first step.
Especially as in your case f(I)=RI/L

@Mute: Yes I noticed that and was concerned - now you've pointed it out I can relax :) OP seems not to understand the differential equation.

Semi walk-through:

OPs integral is of the form

y(x)=\int f(x).dx - \int ay(x).dx
... and only the second term is causing trouble.
Focussing on the problematic term - differentiate both sides:

\frac{dy}{dx}=ay

...rearrange and integrate both sides:

\int \frac{dy}{y}=a\int dx

which yields:

\ln{|y|}=ax+c
... where c is the constant of integration - the actual problem has definite integrals so apply limits. Anyway - need to make y the subject so we take the natural exponent of both sides.

y=Ce^{ax}
... where C=ec

... so what did I miss?

Of course, it may be more like:

I=\frac{R}{L}\int_0^T i(t)dt
... which is to say the integral is expected to turn out a single number, rather than:

I=\frac{R}{L}\int_0^t i(t^\prime)dt^\prime
... but I don't want to make it too easy :)
[between this and #5, it should be easy.]

http://en.wikipedia.org/wiki/Integrating_factor

The integrating factor cannot allow Q(x) to be zero for all x, otherwise the quantity:

y = \frac{\int Q(x) M(x)\, dx}{M(x)}

...would also be zero. This would not help me.

So I have to set Q(x) to the value of the first term. Therefore, given an ordinary differential equation of the form:

y'+P(x)y = Q(x)

I' + \frac{R}{L}I = \frac{V}{L}\left(1-e^{-t\frac{1}{RC}}\right)
y' = I'
P = \frac{R}{L}
y = I
Q = \frac{V}{L}\left(1-e^{-t\frac{1}{RC}}\right)

The integrating factor:
M(x)=e^{\int P(x)\,dx}

...is therefore:

M(x)=e^{t\frac{R}{L}}

Therefore, y equals:

y = \frac{\int \left(\frac{V}{L}\left(1-e^{-t\frac{1}{RC}}\right)\right) \left(e^{t\frac{R}{L}}\right)\, dt}{e^{t\frac{R}{L}}}

To solve integral of the numerator, I used:

http://www.quickmath.com/webMathema...1=(V/L)*(1-e^(-t/a))*(e^(t/b))&v2=t&v3=0&v4=T

http://www.quickmath.com/msolver//graphs/2011-12-05/3e/ed/6d/3eed6d27b0b2dd008c1be88cce8245fc-3.png?t=1323052868

If my math is correct, then the solution is:

y=\frac{\frac{V}{R}\left(\frac{(((L/R)^2 - LC)e^{T/(RC)} + LC)e^{\frac{TR}{L}-\frac{T}{RC}} - \left(\frac{L}{R}\right)^2}{\frac{L}{R} - RC}\right)}{e^{\frac{TR}{L}}}

However, when T becomes modestly large, my MS Excel spreadsheet doesn't seem to be able to handle it. So I can't verify the correctness of this using MS Excel.

At least I can plot it on the QuickMath site. It is also in the expected shape:

http://www.quickmath.com/webMathema...=T&v8=y&v9=0&v10=20&v11=0&v12=1&v16=light-red

http://www.quickmath.com/msolver//graphs/2011-12-05/e5/38/eb/e538ebf6aa9c832b718fb73d770c1245-1.png?t=1323057486

http://www.quickmath.com/msolver//graphs/2011-12-05/8d/97/d2/8d97d20d75f4ac3ace6dfedcd6be1a34-1.png?t=1323057564

L/R=10
RC=1
V=100
L=1000
R=100
V/R=1
 
Last edited by a moderator:
  • #10
That looks over-complicated.
However, you have seen that your original question has been answered.

In the following I will use lower case for the time varying current i(t) and upper case I to denote fixed values - I find that easier to read. I'll repeat the first part of what you did for clarification. As always, check my working[1]: this is supposed to be illustrative, not correct.

In standard form, the DE is:

L\frac{d}{dt}i + Ri = V_f \left ( 1- e^{-t/RC} \right )

So you need an integrating factor of e^{Rt/L}:

i(t)=\frac{V_f}{L}e^{-Rt/L}\int e^{Rt/L}(1-e^{-t/RC})dt
... expand the integrand:


i(t)=\frac{V_f}{L}e^{-Rt/L}\left ( i_1 - i_2\right )
... where:
\begin{align}<br /> i_1 &amp; =\int e^{Rt/L}dt\\<br /> i_2 &amp; =\int \exp{\left [(\frac{R}{L}-\frac{1}{RC})t \right ]}dt<br /> \end{align}

... using a\int e^{at}dt = e^{at}, divide through by L, gives:

i= V_f\left [<br /> \frac{1}{R}\exp{\left [ ( \frac{R}{L} )t \right ] }<br /> - \frac{RC}{R^2C-L}\exp{\left [(\frac{R}{L}-\frac{1}{RC})t \right ]}<br /> \right ] e^{-Rt/L} +c
... where c is the constant of integration, determined from initial condition (i.e. i(0)=I_0)
I_0 = \frac{V_f}{R}- \frac{RCV_f}{R^2C-L} + c

If I expand the brackets and then collect like terms I get:

<br /> i= V_f\left [<br /> \frac{1}{R}<br /> - \frac{RC}{R^2C-L}\exp{\left [-(\frac{1}{RC})t \right ]}<br /> \right ] +c<br />

Which should give an idea if how it behaves.
When t \gg RC the exponential term vanishes, leaving:

i(t \gg RC) \rightarrow \frac{V_f}{R} + c =I_f

Putting I0=0 and (given figures) RC=1, V=100, L=1000, R=100; the equation becomes:

i(t)= \frac{1}{9}\left ( e^{-t} - 1 \right )<br />

The current starts at 0 and decays exponentially to -(1/9) units with a mean-time of 1s.

attachment.php?attachmentid=41578&stc=1&d=1323072129.png



----------------------
[1] I am not going to guarantee any of these calculations are 100% correct or correctly performed. Finding my mistakes is left as an exercise for the student xD
 

Attachments

  • pic.png
    pic.png
    3.1 KB · Views: 575
  • #11
kmarinas86 said:
To solve integral of the numerator, I used:

http://www.quickmath.com/webMathema...1=(V/L)*(1-e^(-t/a))*(e^(t/b))&v2=t&v3=0&v4=T



If my math is correct, then the solution is:

y=\frac{\frac{V}{R}\left(\frac{(((L/R)^2 - LC)e^{T/(RC)} + LC)e^{\frac{TR}{L}-\frac{T}{RC}} - \left(\frac{L}{R}\right)^2}{\frac{L}{R} - RC}\right)}{e^{\frac{TR}{L}}}

However, when T becomes modestly large, my MS Excel spreadsheet doesn't seem to be able to handle it. So I can't verify the correctness of this using MS Excel.

At least I can plot it on the QuickMath site. It is also in the expected shape:

http://www.quickmath.com/webMathema...=T&v8=y&v9=0&v10=20&v11=0&v12=1&v16=light-red

http://www.quickmath.com/msolver//graphs/2011-12-05/e5/38/eb/e538ebf6aa9c832b718fb73d770c1245-1.png?t=1323057486

http://www.quickmath.com/msolver//graphs/2011-12-05/8d/97/d2/8d97d20d75f4ac3ace6dfedcd6be1a34-1.png?t=1323057564

L/R=10
RC=1
V=100
L=1000
R=100
V/R=1

Whooops! A bit of typo there. It's actually supposed to be:

y=\frac{\frac{V}{L}\left(\frac{(((L/R)^2 - LC)e^{T/(RC)} + LC)e^{\frac{TR}{L}-\frac{T}{RC}} - \left(\frac{L}{R}\right)^2}{\frac{L}{R} - RC}\right)}{e^{\frac{TR}{L}}}

The graphs I showed reflect this equation (not the typo version).

By the way: The graph at http://www.quickmath.com/webMathema...=T&v8=y&v9=0&v10=20&v11=0&v12=1&v16=light-red only works if you clear the second and third equations, y=sin(x) and x^2+y^2=1 as they are not needed in the problem, otherwise one gets the message "When defining an equation to graph please use variables T and y only. You have: x in `y = sin(x)`". After those two are deleted, leaving behind the line where

y=(((10^2-10)*%e^(T)+10)*%e^(T/10-T)/(10-1)-10^2/(10-1))*100/1000/(%e^(T/10))

is written, then the graph can be successfully plotted by clicking on the plot button.

To avoid that issue, it is simpler just to click this link http://www.quickmath.com/webMathema...1))*100/1000/(%e^(x/10))&v2=0&v3=20&v4=0&v5=1

Equation

http://www.quickmath.com/msolver//graphs/2011-12-05/3f/e4/4b/3fe44bf4b326bd8d36e1ac63b00b661e-1.png?t=1323087170

Result

http://www.quickmath.com/msolver//graphs/2011-12-05/3f/e4/4b/3fe44bf4b326bd8d36e1ac63b00b661e-2.png?t=1323087170
 
Last edited by a moderator:
Back
Top