Application of the first part of the fundamental theorem of calculus I want to evaluate

$$\frac{d}{dx}\int_0^{x^2}\sin(t^2)dt$$

by the first part of the fundamental theorem of calculus. I see two different ways of evaluating this problem.
Method 1: 
Since the first part of the fundamental theorem of calculus states that
$$\frac{d}{dx}\int_a^{x}f(t)dt=f(x)$$
we have that
$$\frac{d}{dx}\int_0^{x^2}\sin(t^2)dt=2x\sin(x^2)\tag{1}$$
Method 2:
The above analysis is wrong since you need to substitute $x^2$ for $t^2$. The correct answer is
$$\frac{d}{dx}\int_0^{x^2}\sin(t^2)dt=2x\sin((x^2)^2)=2x\sin(x^4)\tag{2}$$
Is $(2)$ the correct solution to this problem? What is the best way of explaining why $(2)$ is correct? 
 A: Name
$$G(x) = \int_0^{x}\sin(t^2)dt$$ and $F(x) = x^2$
You have 
$$H(x) = \int_0^{x^2}\sin(t^2)dt = (G \circ F)(x).$$
Apply the chain rule. You're looking to compute $$H^\prime(x) = F^\prime(x)(G^\prime \circ F)(x).$$
As you noticed 
$$G^\prime(x) = \sin(x^2).$$
Hence
$$H^\prime(x) = 2x \sin(x^4)$$
A general advice: give names to the objects (maps here) and use theorems based on those names. This ease the understanding when you're starting to use theorems new to you.
A: Let $$F(x)=\int_0^x \sin(t^2)\,\mathrm d t.$$
Then, $$\int_0^{x^2}\sin(t^2)\,\mathrm d t=F(x^2),$$
and thus $$\frac{\mathrm d }{\mathrm d x}\int_0^{x^2}\sin(t^2)\,\mathrm d t=\frac{\mathrm d }{\mathrm d x}F(x^2)\underset{(*)}{=}2xF'(x^2)\underset{(**)}{=}2x\sin(x^4),$$
where $(*)$ come from the chain rule and $(**)$ come from the fondamental theorem of analysis that says that $F'(y)=\sin(y^2)$.
A: The best way is to let F be the anti derivative  of $sin(t^2)$.
Then after integration we get $F(x^2)-F(0)$.
We take the derivative  with respect to the chain rule:
$F(0)$ is constant so drops out.
And chain rule gives $F’(x^2) 2x$.  But $F’$ just $sin(t^2)$ so we plug in  to get $sin(x^4)2x$
A: This is an application of the chain rule.
Let $f(u) = \int_0^u \sin(t^2) \,\mathrm{d}t$.  Then you want 
$$  \frac{\mathrm{d}}{\mathrm{d}x} f(x^2) = \left. \frac{\mathrm{d}}{\mathrm{d}u} f(u) \right|_{u = x^2} \cdot \frac{\mathrm{d}}{\mathrm{d}x} x^2  $$
Apply the FTC to the first factor and the power rule to the second factor, obtaining 
$$  \frac{\mathrm{d}}{\mathrm{d}x} f(x^2) = \left. \sin(u^2) \right|_{u=x^2} \cdot 2x = 2 x \sin(x^4) \text{.}  $$
A: You should both differentiate the upper limit and substitute the upper limit for the variable in the integrand. Then multiply both results. Thus, (2) is the correct form.
This is just an application of the chain rule, which turns composition into multiplication.
