# Determining a function from deriv, func in integral

Hello!

I have a value which changes over time, I think I can represent this as f(t). It increases by an amount determined by two other values which also change with t: g(t) and h(t), all multiplied by a constant: A. It decreases by an amount determined by its value at the given time: f(t), multiplied by some constant: B.
So I figured:
$$\frac{d}{dt}(f(t)) = A g(t) h(t) - B f(t)$$

So the value of the function at time = t1 is:

$$\int_{0}^{t_{1}}\frac{d}{dt}(f(t)) dt = A \int_{0}^{t_{1}} g(t) h(t) dt - B \int_{0}^{t_{1}}f(t) dt$$

This gives f(t1) - f(t), f(t) in this case = 0, and so it gives f(t1).
$$f(t1) = A \int_{0}^{t_{1}} g(t) h(t) dt - B \int_{0}^{t_{1}}f(t) dt$$
However, the second component on the RHS says that the integral of f(t) dt from 0 to t1 is required. The value of t at a given time between 0 and t1, say t = a, is given by the equation above, evaluated from 0 to a. Therefore:

$$f(t1) = A \int_{0}^{t_{1}} g(t) h(t) dt - B \int_{0}^{t_{1}}(A \int_{0}^{t_{1}} g(t) h(t) dt - B \int_{0}^{t_{1}}f(t) dt) dt$$

Does that even make sense?
I'm stuck! Help!

HallsofIvy
Homework Helper
Hello!

I have a value which changes over time, I think I can represent this as f(t). It increases by an amount determined by two other values which also change with t: g(t) and h(t), all multiplied by a constant: A. It decreases by an amount determined by its value at the given time: f(t), multiplied by some constant: B.
So I figured:
$$\frac{d}{dt}(f(t)) = A g(t) h(t) - B f(t)$$

So the value of the function at time = t1 is:

$$\int_{0}^{t_{1}}\frac{d}{dt}(f(t)) dt = A \int_{0}^{t_{1}} g(t) h(t) dt - B \int_{0}^{t_{1}}f(t) dt$$

This gives f(t1) - f(t), f(t) in this case = 0, and so it gives f(t1).
$$f(t1) = A \int_{0}^{t_{1}} g(t) h(t) dt - B \int_{0}^{t_{1}}f(t) dt$$
However, the second component on the RHS says that the integral of f(t) dt from 0 to t1 is required. The value of t at a given time between 0 and t1, say t = a, is given by the equation above, evaluated from 0 to a. Therefore:

$$f(t1) = A \int_{0}^{t_{1}} g(t) h(t) dt - B \int_{0}^{t_{1}}(A \int_{0}^{t_{1}} g(t) h(t) dt - B \int_{0}^{t_{1}}f(t) dt) dt$$
If I understand what you are saying this should be
$$f(t1) = A \int_{0}^{t_{1}} g(t) h(t) dt - B \int_{0}^{t_{1}}(A \int_{0}^{t} g(z) h(z) dz - B \int_{0}^{t}f(z) dz) dt$$
That is, the inner integral is from 0 to t, and gives a function of t to be integrated again.
Does that even make sense?
I'm stuck! Help!
I don't see how that helps you at all! If you are trying to solve the differential equation,
$$\frac{df}{dx}+ Bf= Ag(t)h(t)$$
then you need to find an "integrating factor". That is a function, u(t), such that multiplying the entire equation by it makes the left side an "exact differential"- that is
$$\frac{duf}{dt}= u\frac{df}{dt}+ Buf= Au(t)g(t)h(t)$$
Once you have that, integrating on both sides gives
$$u(t)f(t)= A\int u(t)g(t)h(t)dt$$

To find the integrating factor, use the product rule for the derivative:
$$\frac{duf}{dt}= u\frac{df}{dt}+ \frac{du}{dt}f= u\frac{df}{dt}+ Buf$$
so we must have du/dt= Bu. Since B is a constant, that is easy to solve: $u(t)= e^{Bt}$.

That is, multiplying by $e^{Bt}$ makes the equation
$$e^{Bt}\frac{df}{dt}+ Be^{Bt}= \frac{e^{Bt}f}{dt}= Ae^{Bt}g(t)h(t)$$
and, integrating,
$$e^{Bt}f(t)= A\int e^{Bt}g(t)h(t)dt$$
so that
$$f(t)= e^{-Bt}\int_a^t e^{Bz}g(z)h(z)dz$$
where I have changed the "dummy" variable of integration on the right so you will not accidently "cancel" the two exponentials. The upper limit is t so the right hand side is a function of t. You can take the lower limit to be whatever is convenient. Changing it just changes the constant of integration.

That is, multiplying by $e^{Bt}$ makes the equation
$$e^{Bt}\frac{df}{dt}+ Be^{Bt}= \frac{e^{Bt}f}{dt}= Ae^{Bt}g(t)h(t)$$
and, integrating,
$$e^{Bt}f(t)= A\int e^{Bt}g(t)h(t)dt$$
so that
$$f(t)= e^{-Bt}\int_a^t e^{Bz}g(z)h(z)dz$$
where I have changed the "dummy" variable of integration on the right so you will not accidently "cancel" the two exponentials. The upper limit is t so the right hand side is a function of t. You can take the lower limit to be whatever is convenient. Changing it just changes the constant of integration.
Thanks for all the help, it's much appreciated.
I am slightly confused, however.
When integrating:
$$\frac{d}{dt}(u(t)f(t)) = A u(t)g(t)h(t)$$
If u(a)f(a) = 0, where a is the lower bound, then I can see why we can divide by u(t). However, if it doesn't, then we can't divide both sides by u(t), since f(b)u(b) - f(a)u(a), the difference from the definite integral, with b the upper bound, is the difference of different, non-zero products. Is this correct? Also, since u(t) can't = 0 (i.e. it's never zero), then f(a) has to equal zero.
I can attempt to write it in latex if necessary! I hope it makes sense.