How to apply Newton-Leibnitz formula for derivative in this case? $f\left(x\right)=\int_0^x e^t\sin\left(x-t\right)dt$ How to apply Newton-Leibnitz formula for finding $f'(x)$ in this case? $f\left(x\right)=\displaystyle\int_0^xe^t\sin\left(x-t\right)dt$
Two methods I did both gave me different answers, probably doing something wrong fundamentally.
Method 1: $f'(x) = e^x\sin(x-x) = 0$
Method 2: $f\left(x\right)=\displaystyle\int_0^xe^{x-t}\sin\left(t \right)dt=e^x\int_0^xe^{-t}\sin\left(t\right)dt$ which can further be calculated using product rule and which doesn't really equal to $0$
So my question is what am I doing wrong in case $1$? Is there some standard rule or requirement of the newton-leibnitz theorem that I am missing?
 A: The first method is incomplete.  There are two $x$s in there, so use the chain rule for partial derivatives, with one term for each $x$:
$$
\frac{d}{dx}\int_0^x e^t\sin(x-t)\;dt =
e^x\sin(x-x) +
\int_0^x e^t \cos(x-t)\;dt
$$

Chain rule says:
$$
\frac{d}{dx} G(f(x),g(x)) = G_1(f(x),g(x))f'(x) + G_2(f(x),g(x))g'(x)
$$
where $G_1, G_2$ are the two partial derivaives of $G$.
Apply it with:
$$
G(u,v) = \int_0^u e^t\sin(v-t)\;dt,\quad f(x) = x,\quad g(x) = x .
$$
A: You can not apply Newton-Leibnitz in case I. Starting from GEdgar answer, you can find the integral by parts as GEdgar did and then take the one that has $\frac{d}{dx}$ to the left side to have $f'(x)$ as this is the trick. You can proceed from there to find your approximation. The point behind Newton-Leibnitz is to find an approximation for the zeros of a function $f(x)=0$, so $b=a-(\frac{f(a)}{f'(a)})$ starts approaching this zero starting from $a$, but I don't see $a$ is given in your question.
In general,
$$x_x=x_{n-1}-\frac{f(x_{n-1})}{f'(x_{n-1})}.$$ A lot of the time $b$ or $x_n$ is a better approximation than $a$ or $x_{n-1}$.
