Before I touch anything, let me say what this question is. We have f of x as the integral from zero to x squared of sine of t squared, and we are asked to differentiate it. And I want to flag the trap built into it straight away: the function sine of t squared has no elementary antiderivative - there is no combination of polynomials, exponentials, logarithms or trig functions you can differentiate to get it. A candidate who starts by trying to do the integral will stall, and I don't think that stall is accidental.
So my strategy is to never evaluate the integral at all. This is a function defined by an integral, composed with x squared, and the fundamental theorem of calculus plus the chain rule differentiates it directly. I expect a perfectly ordinary closed answer at the end - two x sine of x to the fourth - and I'll write that target down now so you can hold me to it.
Let me split the object into two named pieces. Define F of u to be the integral from zero to u of sine of t squared, and set u equal to x squared. Then f is simply F composed with the squaring map - a composition of two functions I can each name.
The inner function is a polynomial, so it is differentiable with derivative two x. For the outer one, the integrand sine of t squared is continuous everywhere - in fact smooth - so the first part of the fundamental theorem applies wholesale: F is differentiable at every u, and F prime of u is just the integrand read at the upper limit, which is sine of u squared. Notice what I have and have not done: I never found a primitive of sine of t squared, and I am not going to need one.
I'll draw the structure before the algebra, because the algebra is exactly this picture. X enters the first box, which squares it; the output u enters the second box, the accumulator F; the composition is f.
Differentiating a chain like this multiplies the local slopes: the slope of F at the input u equals x squared, times the slope of the squaring map, which is two x. Nothing in that multiplication ever asks for a formula for F - the integral sign lives entirely inside the second box, and the chain rule never opens it.
Now the computation is one line. The outer derivative is the integrand evaluated at the upper limit - and here is the place to be careful: the integrand squares its input, and the input is x squared, so I get sine of x to the fourth, not sine of x squared. The inner derivative is two x. Multiply: f prime of x equals two x sine of x to the fourth.
That is the answer, and notice it is a genuine elementary function - the derivative is simpler than anything an antiderivative hunt could produce, because there was never an antiderivative to find.
Since we refuse to integrate, let me at least draw the thing we refused to integrate, to prove it is not a monster. I computed F by numerical quadrature and plotted it. It climbs like u cubed over three near the origin, overshoots to a maximum of about nought point eight nine four eight at u equal root pi - that is exactly where sine of u squared drops back through zero - dips to about nought point four three zero at u equal root two pi, and settles onto the Fresnel limit root pi over eight, about nought point six two seven. The settling is slow and wobbly: at ten it is still 0.043 below the limit, at twenty 0.013 above.
The marked point is u equals one point four four - that is x equal one point two squared - and the tangent drawn there has slope sine of u squared at that point, 0.8762. The whole question is nothing but the slope of this curve at the moving point u equals x squared, times the speed two x.
Numbers next, and I want them to come from below, not from the theorem I just used. I evaluate f by quadrature at x plus h and x minus h, take the central difference with step one ten-thousandth, and compare against two x sine of x to the fourth. At one half the formula line prints nought point nought six two four five nine three two and the difference line prints nought point nought six two four five nine three three, so they agree to eight decimal places but not to the last unit; likewise at one, where the difference comes out below. At one point five the gap is 9.3 ten millionths, at two 1.5 millionths - the h squared truncation error of the central difference, growing with the third derivative of f, which is fine.
Shrinking h to a millionth shrinks every gap by about four orders of magnitude - down to around 10 to the minus twelve at x equals one half. So it is the finite-difference step, not my formula, that sets the discrepancy, and the fundamental theorem and raw quadrature agree to the six-to-eight decimals I measured.
Second confidence, structural rather than decimal. Because the upper limit is x squared, f is even - I measured zero point five seven zero seven four three three at plus one point five, and the same value at minus one point five to machine precision - so its derivative must be odd. And two x sine of x to the fourth is odd: minus two point eight one eight at plus one point five, plus it at minus one point five.
At the origin the formula gives zero, but that is not just arithmetic luck: the integrand behaves like t squared near zero, so f is about x to the six over three, and f prime is flat to fifth order - the difference ratio f of h over h at h equal one ten-thousandth came out three point three three times ten to the minus twenty-one, which is exactly h to the fifth over three.
The graph fixes the shape: zeros where x to the fourth hits a multiple of pi - one point three three one, one point five eight three, one point seven five two - oscillations crowding outward because the phase x to the fourth accelerates, and the amplitude locked inside the envelope plus or minus two x. Series and theorem also shake hands: at x equal nought point eight the three-term series gives 0.6371885 against the analytic 0.6371879, and the six ten-millionths between them is exactly the first term we dropped, x to the twenty-nine over two thousand five hundred and twenty.
So the answer is two x sine of x to the fourth - and the whole point in one sentence: the derivative of an integral sign is evaluation, not antidifferentiation.
Let me widen the hinge. The general Leibniz form with both limits variable evaluates the integrand at each limit and multiplies by that limit's speed, subtracting lower from upper. Here the lower limit is the constant zero, so its term simply is not there, and the computation reduces to evaluate-and-multiply. It also shows the zero was cosmetic: start the integral at one, or at minus seven, and the derivative is unchanged - constants die under differentiation.
One caveat I'll volunteer before anyone asks: this clean rule needs the integrand to depend only on t. If x also sits inside the integrand, a second term appears, an integral of a partial derivative - and I'll happily show that if it is useful.
Only if invited. Two things show range without changing the answer. First, the total area does exist even though the primitive does not: F settles to the Fresnel value root pi over eight, nought point six two six six five seven - I got it by rescaling the standard Fresnel sine integral. The convergence is conditional, not absolute: take the absolute value and the integral grows linearly, because the average of the absolute value of sine is two over pi, so by the time t reaches a million the absolute area has swept six hundred and thirty-six thousand six hundred - the humps keep their size and only narrow.
Second, the panic version of this question is unfounded at a deeper level: Liouville's theorem in differential algebra says sine of t squared has no elementary antiderivative, so the integral sign is genuinely the cheapest correct notation for F.
At interview, the sentence that closes this is: Fresnel-type, non-elementary - and the fundamental theorem does not care.
Same machine, one sign change. The derivative is the integrand read at the upper limit, sine of cosine squared x, times the speed of the upper limit, which is minus sine of x. At x equal one that predicts minus zero point two four two one seven four.
I checked it: central-differencing the quadrature at x equals one gives minus zero point two four two one seven four to eight decimals as well. And note the meaning of the sign - where the upper limit turns around, as cos x does at zero, the derivative just changes sign with its speed.
Then the clean evaluate-and-multiply rule dies and the full Leibniz integral rule is required: besides the boundary term - the integrand at the upper limit, two x sine of the whole of x to the fourth plus x - you must add the integral of the partial derivative of the integrand with respect to x, from zero to x squared. Here that partial derivative is cosine of t squared plus x.
So the answer is two x sine of the whole of x to the fourth plus x, plus the integral of cosine of the whole of t squared plus x over the moving range. I verified at x equals one: the formula gives two point zero four six two two nine six, and central-differencing the quadrature gives the same eight figures apart from the last digit. Also worth saying: that leftover integral is another non-elementary integral - the rule keeps working even then.
Yes, once you leave the elementary world. Rescaling the argument turns F into the square root of pi over two times the standard Fresnel sine integral evaluated at u times the square root of two over pi - that is the closed form, and it is exactly what symbolic engines print. I used that identity as a cross-check against raw quadrature: at u equals two and a half both routes give zero point four three zero five one seven seven.
Everything else follows from the same function: the improper integral to infinity is the Fresnel value root pi over eight. But none of this was needed to differentiate - the whole design of the question is that the name exists before the formula does.
The formula gives two times zero times sine of zero, but the honest check is the limit definition, because that is where the flatness lives. Near zero the integrand is about t squared, so f of h is about h to the six over three - at h equal one, the two-term series gives 0.3095 against the true 0.3103 - and f of h minus f of zero over h is about h to the fifth over three.
That tends to zero, of course it does; numerically at h equal a ten-thousandth the difference ratio is three point three three times ten to the minus twenty-one, exactly h to the fifth over three. So the origin is a genuinely flat stationary point, and the same expansion shows the first non-zero term of f prime is two x to the fifth.