I'm having trouble applying the formula for the remainder in the Taylor's theorem.
From Wikipedia we know that for
$f(x)=f(a)+f'(a)(x-a)+…\frac{f^{(n)}(a)}{n!}(x-a)^{n}+R$
the remainder $R$ in the integral form is
$R=\int_{a}^{x}\frac{f^{(n+1)}(t)}{n!}(x-t)^{k}dt$
Now, what I want to do is, for the following expansions
1) $\psi_{0}(\lambda_{0}x+(\lambda-\lambda_{0})x)=\psi_{0}(\lambda_{0}x)+\psi_{0}'(z)(\lambda-\lambda_{0})x$
2) $\phi(\psi_{0}(\lambda_{0}x)+\psi_{0}'(z)(\lambda-\lambda_{0})x)=\phi(\psi_{0}(\lambda_{0}x))+\phi'(\alpha)\psi_{0}'(z)(\lambda-\lambda_{0})x$
with $z=z(x,\lambda,\lambda_{0})$, $\alpha=\alpha(x,\lambda,\lambda_{0})$, to write down the first derivative terms on the right hand side as the remainder terms of appropriate order.
I am not sure if I "translated" the Wikipedia formula correctly for my expansions, but here is what I got:
1) $\psi_{0}'(z)(\lambda-\lambda_{0})x=\int_{\lambda_{0}x}^{\lambda_{0}x+(\lambda-\lambda_{0})x}\psi_{0}'(t)dt=\int_{\lambda_{0}}^{\lambda}x\psi_{0}'(sx)ds$ (in the last step I used a change of variables $t\mapsto sx$)
2) $\phi'(\alpha)\psi_{0}'(z)(\lambda-\lambda_{0})x=\int_{\psi_{0}(\lambda_{0}x)}^{\psi_{0}(\lambda_{0}x)+\psi_{0}'(z)(\lambda-\lambda_{0})x}\phi'(t)dt$
Can anyone please tell me if my calculations are correct/where did I make a mistake? Also, in the integral for 2), which change of variables can I use to get the integral go from $\lambda_{0}$ to $\lambda$?
Many thanks! (this is not homework)