Question:
Solve
$$\frac{\mathrm{d}}{\mathrm{d}x}\left(\int _{x^2}^{\tan^{-1}x}\:\sin\left(t\right) \, \mathrm{d}t\right),$$ where $x>0$
As much as possible, simplify your answer.
Attempt:
To find the derivative of the given integral, we can apply the Fundamental Theorem of Calculus Part 1, which states that if $F(x)$ is an antiderivative of $f(x)$ on the interval $[a, b]$, then:
$$\frac{\mathrm{d}}{\mathrm{d}x}\int_{a(x)}^{b(x)}f(t) \, \mathrm{d}t = f(b(x))\cdot b'(x) - f(a(x))\cdot a'(x)$$
Given the integral:
$$\int_{x^2}^{\tan^{-1}(x)}\sin(t) \, \mathrm{d}t$$
Let's first find the derivatives of the limits of integration with respect to $x$:
- $a(x) = x^2 \Rightarrow a'(x) = \frac{\mathrm{d}(x^2)}{\mathrm{d}x} = 2x$
- $b(x) = \tan^{-1}(x) \Rightarrow b'(x) = \frac{\mathrm{d}(\tan^{-1}(x))}{\mathrm{d}x}$
To find $b'(x)$, we can use the chain rule:
$$b'(x) = \frac{\mathrm{d} \left(\tan^{-1}(x) \right)}{\mathrm{d}x} = \frac{\mathrm{d} \left(\tan^{-1}(x)\right)}{\mathrm{d}u}\cdot \frac{\mathrm{d}u}{\mathrm{d}x}\text{ where }u = x$$
Since $\frac{\mathrm{d} \left(\tan^{-1}(u)\right)}{\mathrm{d}u} = \frac{1}{1+u^2}$ (this is the derivative of the arctangent function), we have:
$$b'(x) = \frac{1}{1+x^2}$$
Now we can apply the Fundamental Theorem of Calculus Part 1:
$$\frac{\mathrm{d}}{\mathrm{d}x}\int_{x^2}^{\tan^{-1}(x)}\sin(t) \, \mathrm{d}t = \sin \left(\tan^{-1}(x) \right)\cdot \frac{1}{1+x^2} - 2x\cdot \sin(x^2)$$
Therefore, the derivative of the integral is:
$$\frac{\mathrm{d}}{\mathrm{d}x}\int_{x^2}^{\tan^{-1}(x)}\sin(t) \, \mathrm{d}t = \frac{\sin \left(\tan^{-1}(x) \right)}{1+x^2} - 2x\sin(x^2)$$
Is this correct?
In principle, it is correct, but there are a number of items we can improve upon.
Fundamental Theorem of Calculus:
Speaking as a teacher, I see students too often try to blindly memorize formulas, so it immediately pops out to me you're using a complicated statement of one of the halves of the fundamental theorem of calculus. It is much more prudent to understand how to put the simpler and more basic pieces of information together, and to understand what you are doing and why, than it is to memorize and vomit up formulas at a whim.
The fundamental part here is that $$\newcommand{\dd}{\mathrm{d}} \newcommand{\dv}[2]{\frac{\dd #1}{\dd #2}} \dv{}{x} \int_a^x f(t)\, \dd t = f(x) $$ and this should be your focus. Bear in mind when this statement applies: most importantly for my discussion, when $a$ is a constant, $x$ is just $x$ (no functions of $x$), and they're in the order presented.
Your formula can be found from this and the chain rule. For instance, consider $$ \dv{}{x} \int_a^{g(x)} f(t) \, \dd t $$ Define the function $$ I(x) := \int_a^x f(t) \, \dd t $$ Then this derivative is fundamentally just $$ \dv{}{x} I \Big( g(x) \Big) $$ but we know the chain rule gives this to be $$ \dv{}{x} I \Big( g(x) \Big) = I' \Big( g(x) \Big) g'(x) $$ and the fundamental theorem of calculus gives us what $I'(x)$ is, so $$ I' \Big( g(x) \Big) g'(x) = f(g(x)) g'(x) $$
Exercise: Generalize to when you have a function of $x$ in the top and bottom. Convince yourself that we can just use that $$ \int_{a(x)}^{b(x)} f(t) \, \dd t = \int_{a(x)}^c f(t) \, \dd t + \int_c^{b(x)} f(t) \, \dd t $$ for a fixed constant $c$. Ensure you get the left integral in the desired form.
Derivative of Arctangent:
I would like to focus on this line:
Think about what you are doing here; you're making a substitution of $u=x$ to use the chain rule. Is this really necessary? This definition of $u$ and $x$ mean they behave identically.
In fact, it is why -- and this will be hammered into you when you start integration -- that the names of variables do not strictly matter. When I am finding $$ \dv{}{x} x^5 \qquad \dv{}{t} t^5 \qquad \dv{}{\xi} \xi^5 \qquad \dv{}{\;\;} ()^5 $$ I am going to be using the same rules, the same derivatives, the same algebra, the same calculations. The variable is just under a different name. So if you see a formula that tells you $$ \dv{}{x} x^5 = 5x^4 $$ this means that, if you replace that $x$ in the entire formula with any other variable then you immediately know the result for them too - because $x$ is just a name of a variable. So I immediately know $$ \dv{}{t} t^5 = 5t^4 \qquad \dv{}{\xi} \xi^5 = 5\xi^4 \qquad \dv{}{\;\;} ()^5 = 5()^4 $$ If the formula you know is $$ \dv{}{u} \arctan(u) = \frac{1}{1 + u^2} $$ then we know $$ \dv{}{x} \arctan(x) = \frac{1}{1 + x^2} $$ where every instance of $u$ is replaced with $x$.
Compositions of Trig Functions:
Whenever we have $f(g(x))$ for $f$ being one of your six main trig functions ($\sin(x),\cos(x),\tan(x)$, etc.) and $g$ any one of their inverses ($\arcsin(x), \arccos(x)$, etc.), not necessarily for $f$, we can simplify things a bit better.
The best way to handle this is with a triangle. Suppose we wish to find $\sin(\arctan(x))$. Well, $\sin(\theta)$ takes in angles $\theta$ as input, so let $\theta = \arctan(x)$. Well, then $\tan \theta = x$. The corresponding basic right triangle setup for $\tan \theta = x = x/1$ is
(The vertical and horizontal sides come from $\tan \theta = x/1$; remember that tangent is opposite over adjacent. The hypotenuse comes from the Pythagorean theorem.)
Well, then we know that, here,
$$\sin \theta = \frac{\text{opposite}}{\text{hypotenuse}} = \frac{x}{\sqrt{x^2+1}}$$
but since we know $\theta = \arctan(x)$
$$\sin(\arctan(x)) = \frac{x}{\sqrt{x^2+1}}$$
I think that's all I have to comment upon.