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

1. Dec 1, 2011

### kmarinas86

Almost two months ago I posted the following question:
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: Dec 1, 2011
2. Dec 1, 2011

### Simon Bridge

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.)

3. Dec 3, 2011

### kmarinas86

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.

4. Dec 3, 2011

### Mute

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).

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.

5. Dec 3, 2011

### jackmell

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\}$$

6. Dec 3, 2011

### Simon Bridge

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.]

7. Dec 4, 2011

### kmarinas86

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).

Last edited: Dec 4, 2011
8. Dec 4, 2011

### jackmell

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})$$

9. Dec 4, 2011

### kmarinas86

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

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

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

Last edited by a moderator: May 5, 2017
10. Dec 5, 2011

### Simon Bridge

That looks over-complicated.

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} i_1 & =\int e^{Rt/L}dt\\ i_2 & =\int \exp{\left [(\frac{R}{L}-\frac{1}{RC})t \right ]}dt \end{align}

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

$$i= V_f\left [ \frac{1}{R}\exp{\left [ ( \frac{R}{L} )t \right ] } - \frac{RC}{R^2C-L}\exp{\left [(\frac{R}{L}-\frac{1}{RC})t \right ]} \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:

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

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 )$$

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

----------------------
[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

#### Attached Files:

• ###### pic.png
File size:
4.4 KB
Views:
192
11. Dec 5, 2011

### kmarinas86

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

Last edited by a moderator: May 5, 2017