Integral Differentiation
1. **State the problem:** We want to evaluate the integral $$\int \sin x \left(1 + 3t^2\right) dt$$ and then differentiate the result with respect to $x$. Then, we want to differentiate the integral directly with respect to $x$ and verify both methods give the same result.
2. **Evaluate the integral first:** Treating $x$ as a constant with respect to $t$, the integral is
$$\int \sin x \left(1 + 3t^2\right) dt = \sin x \int \left(1 + 3t^2\right) dt = \sin x \left(t + t^3\right) + C$$
3. **Differentiate the result with respect to $x$:**
$$\frac{d}{dx} \left[ \sin x \left(t + t^3\right) + C \right] = \cos x \left(t + t^3\right)$$
4. **Differentiate the integral directly:** Using Leibniz's rule for differentiation under the integral sign,
$$\frac{d}{dx} \int \sin x \left(1 + 3t^2\right) dt = \int \frac{\partial}{\partial x} \left[ \sin x \left(1 + 3t^2\right) \right] dt = \int \cos x \left(1 + 3t^2\right) dt$$
5. **Evaluate this integral:**
$$\int \cos x \left(1 + 3t^2\right) dt = \cos x \int \left(1 + 3t^2\right) dt = \cos x \left(t + t^3\right) + C$$
6. **Conclusion:** Both methods yield the same derivative:
$$\cos x \left(t + t^3\right)$$
Thus, differentiating the integral after evaluating or differentiating under the integral sign directly gives the same result.