# Finding a certain function

I am having a problem with the following exercise. Can someone help me please.

Find all functions $f$ for which $f'(x)=f(x)+\int_{0}^1 f(t)dt$

-
You should probably rename the integration variable to something other than $t$. – Lukas Geyer Oct 31 '12 at 15:00

Your differential equation is $f'=f+c$ where $c$ is a constant. This is a first order linear differential equation and the solution has a simple formula. Here you can deduce it:

$f'-f=c$ is equivalent to $(e^{-x}f(x))'=ce^{-x}$ and therefore $$f(x)=e^x(-ce^{-x}+d)=-c+de^x$$

Now you have to impose the condition $\int_0^1 f(x)dx=c$.

-
I am having difficulty determining the constant. Could you help me please. – Carpediem Oct 31 '12 at 17:39
You just need to integrate the exponential from 0 to 1. You won't be able to find $c$ explicitly because you have two unknowns. You just need to find $d$ in terms of $c$. – Beni Bogosel Oct 31 '12 at 17:45

$$\frac{df}{dx} = f + c$$ $$\frac{df}{f+c} = dx$$ (provided $f+c\ne 0$). $$\log_e|f+c| = x + \text{another constant}$$ $$|f+c| = e^{x+\text{other constant}} = (e^x\cdot\text{positive constant})$$ $$f+c = (e^x\cdot\text{some nonzero constant})$$ But since this was "provided $f+c\ne0$, we need to check whether $f+c=0$ is also a solution, and substitution shows that it is.

So the general solution of the diffential equation is $$f(x) = ke^x - c.$$ We want $c$ to be $$\int_0^1 f(t)\,dt = \int_0^1 ke^t - c\,dt = ke-k-c.$$

Finally, we've got $$f(x) = ke^x -\frac{k(e-1)}{2}.$$

-