Calculate $\frac{d}{dx}\left(\int_0^{x^2} te^t dt\right)$ and $\frac{d}{dx}\left(\int_0^{x^2} f(t) dt\right)$ I have an assignment where one problem is to calculate two expressions, one with a given function and one with a general function. Previous assignments have been very picky in the grading and I've lost points for (in my opinion) very small details, so my question is if anyone can find anything about the solutions below that is missing, not clear enough, make too many intermediate steps at the same time, etc. Do the methods seem sound? Do they make assumptions that should instead be made explicit?
a) Calculate $\frac{d}{dx}\left(\int_0^{x^2} te^t dt\right)$.
My solution is as follows:
First I calculate the integral in the parenthesis using partial integration with the choice of $t$ as the function to take the derivative of since it will be $1$ which simplifies things:
$
\begin{align*}
        \int_0^{x^2} te^t dt &= \Big[te^t\Big]_0^{x^2} - \int_0^{x^2} e^t dt \\
                             &= x^2 e^{x^2} - \Big[e^t\Big]_0^{x^2} \\
                             &= x^2 e^{x^2} - (e^{x^2} - e^0) \\
                             &= x^2 e^{x^2} - e^{x^2} + 1 \\
                             &= e^{x^2}(x^2 - 1) + 1
    \end{align*}
$
Then take the derivative of this expression with respect to $x$ and using the product rule:
$
\begin{align*}
        \frac{d}{dx}\left(e^{x^2}(x^2 - 1) + 1\right) &= e^{x^2} \cdot 2x + e^{x^2} \cdot 2x (x^2 - 1) \\
                                                      &= e^{x^2}(2x + 2x(x^2 - 1)) \\
                                                      &= e^{x^2}(2x + 2x^3 - 2x) \\
                                                      &= 2e^{x^2}x^3
    \end{align*}
$
and $2e^{x^2}x^3$ is the final answer.
b) Assume $f: \mathbb{R} \to \mathbb{R}$ is an integrable function. Calculate $\frac{d}{dx}\left(\int_0^{x^2} f(t) dt\right)$. The answer will of course depend on $f$ but cannot include any references to integrals or primitive functions.
My solution is as follows:
First, expand the expression in the paranthesis:
Then take the derivative term by term and using the chain rule:
$\frac{d}{dx}\bigg(F(x^2) - F(0)\bigg)
        = f(x^2) \cdot 2x - f(0)
        = 2x f(x^2)$
Note that $f(0)$ disappears since we take the derivative with respect to $x$ and not $t$. Regardless of what function $F$ is, its value will not contain any $x$. The final answer is $2x f(x^2)$ and it only depends on $x$ and $f$ according to the problem statement.
Edit: As pointed out in a comment that seems to be gone now, $\frac{d}{dx}(F(0)) \neq f(0)$ so the last part is incorrect but gives the same result. I'll update this at some point.

More concise:
Let $g(x):=\int_0^xf(t)$ and $h(x):=g(x^2)$ (so that $h(x)=\int_0^{x^2}f(t)$).
Then $g'(x)=f(x)$ and $h'(x)=2xg'(x^2)$ (application of chain rule)
We conclude that $h'(x)=2xf(x^2)$.
This can be applied on suitable functions like $f(t)=te^t$.
