How to integrate this partly defined function? I have a function $\psi(t):=1$ for $t \in [0,R]$, $\psi(t):=1 + \frac{R-t}{\epsilon}$ for $t \in [R,R+\epsilon]$ and $\psi(t):=0$ for $t > R+ \epsilon$
and a function $\phi(t):=\psi(t+\epsilon)$.
And now I am asked what the integral $\int_0^{\infty} \psi(t) t^{n-1}dt $ is and the same for $\int_0^{\infty} \phi(t)t^{n-1}dt$?
The problem is that as far as I see, if you first integrate this and then take the limit $\epsilon \rightarrow 0$, both integra do not coincide.
Could anybody here please help me with the integrals, since I must have made a mistake. Especially the second one, if you do not have much time. 
Thanks to anybody here in advance!!!
 A: I wouldn't expect these to agree. On the interval $[0,\infty)$ over which you're integrating,  $\psi(t)$ starts out at $1$ until $t$ reaches $R$, then between $R$ and $R+\varepsilon$ goes down linearly to $0$, thereafter staying there. 
The function $\phi(t)=\psi(t+\varepsilon)$ is a shift to the left of the graph of $\psi$ by the amount $\varepsilon.$ You're integrating both functions multiplied by the same thing $t^{n-1}$, and this means that part of either integral has not been shifted while the other part has. So the "ramp down" parts of the two functions end up aligned with different intervals of the multiplier, making it likely the two integrals differ.
The calculations can be done via breaking things up on $[0,R]$ and $[R,R+\varepsilon]$ 
for the function $\psi$, and the other integral on the left shifted version of this, namely $[0,R-\varepsilon]$ and $[R-\varepsilon,R]$
NOTE: Even though before letting $\varepsilon \to 0$ the two integrals are not the same, I think in the limit they are. When I did the limit for the first one, there was part of the expression which one could interpret as the difference quotient for a derivative, and after the limit this gave a term cancelling another term of the value. The result was something like $(R^n-1)/(n^2+n)$ after taking the limit, and I'd expect the same if the ramp part were moved left a bit first, then the integral, then the limit.
ADDED NOTE: I re-did it more carefully, and after taking the limit both integrals approach $R^n/n$ not what I have in the previous note. For the $\psi$ integral the result before the limit was (using $e$ instead of $\varepsilon$)
$$(R+e)/n +(R/n)\frac{(R+e)^n-R^n}{e}-1/(n+1)\frac{(R+e)^{n+1}-R^{n+1}}{e}.$$
For the other function $\phi(t)=\psi(t+e)$ the integral was
$$(R-e)/n+(R/n)\frac{R^n-(R-e)^n}{e} - 1/(n+1)\frac{R^{n+1}-(R-e)^{n+1}}{e}.$$
As $e \to 0,$ in both formulas the first term approaches $R/n.$ The expressions split off as fractions in the first approach the right hand derivatives of $x^n$ and $x^{n+1}$ evaluated at $R$, while the fractions of the second approach the same left hand derivatives. In both cases, once these limits are taken the second and third terms exactly cancel each other, leaving in either case the value $R^n/n$ as the limit when $e \to 0.$
