Single Variable Calculus Fundamental theorem of calculus I'm quite lost on the following problem:
The function $f(x)$ is:
$$f(x)=\int_0^{g(x)} \frac {1}{1+\sin(t) + e^t} dt $$
where $g(x)$ is 
$$g(x)=\int _{-x}^{x^2} h(t) \, dt $$
And $h(t)$ is odd such that $h(1) = 2$. Find the equation of the tangent line of $f(x)$ at $x=1$. 
Please help.
 A: Here is your tool (Leibniz integral rule)

$$ \frac{d}{dx}\int_{g(x)}^{h(x)}f(t) dt=f(h(x)) h'(x)-f(g(x))g'(x). $$

A: Let $F$ be the antiderivative of $m=\frac{1}{1+\sin t+e^t}$, then by the fundamental theorem of calculus:
$f(x)=\int_0^{g(x)}m(t)\,dt=F(g(x))-F(0)$, then the tangent line of $f$ is given by $f'$, so:
$f'(x)=\frac{d}{dx}(F(g(x)-F(0))=g'(x)F'(g(x))$
$g'(x)=\frac{d}{dx}(H(x^2)-H(-x))=2xh(x^2)+h(-x)$ ($H$ is the antiderivative of $h$)
so $f'(1)=g'(1)F'(g(1))=(2h(1)+h(-1))\large(\frac{1}{1+\sin(g(1))+e^{g(1)}})$
$=(2h(1)-h(1))(\frac{1}{1+\sin(g(1))+e^{g(1)}})=2(\frac{1}{1+\sin(g(1))+e^{g(1)}})$
Now $g(1)=\int_{-1}^1h(t)dt=0$ because $h$ is odd.
so $f'(1)=1$
A: To find the line tangent to $f(x)$ at $x=1$ we must find $f(1)$ and $f'(1)$. 
Starting with $f(1)$:
$$f(1)=\int^{g(1)}_{0}\frac{1}{1+\sin t+e^t}dt$$
Proceeding to compute $g(1)$, we have
$$g(1)=\int^{1}_{-1}h(t)dt$$
Since we know that $h(t)$ is odd, we know that $-h(t)=h(-t)$, so any integral of $h$ symmetric to the origin will be $0$. Hence $g(1)=0$. Returning to $f(1)$ we see that
$$f(1)=\int^{0}_{0}\frac{1}{1+\sin t+e^t}dt=0$$
Now turning to $f'(1)$, by the Fundamental Theorem of Calculus we have
$$f'(x)=\frac{g'(x)}{1+\sin g(x) + e^{g(x)}}$$
so 
$$f'(1)=\frac{g'(1)}{1+\sin g(1) + e^{g(1)}}$$
Since we already know $g(1)$ it remains only to compute $g'(1)$. We see that
$$g'(x)=2x\cdot h(x^2)-(-1)\cdot h(-x)$$
by the FTC. Then, again remembering that $h$ is odd and that $h(1)=2$,
$$g'(1)=2\cdot h(1)+h(-1)=2\cdot2+(-2)=2$$
Having computed all the required values, we see that
$$f'(1)=\frac{2}{1+\sin 0 + e^{0}}=\frac{2}{2}=1$$
Now the tangent line to $f$ at $x=1$ is of the form $y-f(1)=f'(1)(x-1)$. Thus
$$y=x-1$$
