square root of an unknown square within indefinite integral

188 Views Asked by At

I have the following function

$$g(x) = \int_0^{(\frac{x}{2})^2} \sin \sqrt{t}\ dt$$

Applying the fundamental theorem of calculus one would get

$$g'(x) = \frac{x}{2} \sin \sqrt{(\frac{x}{2}) ^2}$$

My question is related with the square root within the $\sin$ function. It would seem to me that the square root would cancel with the square and we would get

$$g'(x) = \frac{x}{2} \sin (\frac{x}{2})$$

However I was told that this was not quite right, and that the correct answer is

$$g'(x) = \frac{x}{2} \sin (\frac{|x|}{2})$$

I assume it has something to do with allowing the function to be defined over the whole set of the real numbers, but I am not being able to grasp why. Could someone please clarify?

Thanks in advance.

2

There are 2 best solutions below

1
On

The integral and sine function are not important here. The point is that the square root sign is defined as the positive root, so $\sqrt {a^2}=|a|$. If we try it with $a=-2$, we have $a^2=4, \sqrt 4=2$ This is covered in a number of other questions on the site. One of them is here

2
On

A very common misconception is that $\sqrt{x^2}$ can be simplified to $x$. But in fact they are only equal to each other for positive values of $x$. If $x$ is negative, then $\sqrt{x^2}=-x$.

In general, if you square a number and then take the square root of the result, you end up with the absolute value of the number you began with: i.e. the correct identity is $\sqrt{x^2}=|x|$.