# How to Integrate Sin(Sqrt(x)) and Cos(Sqrt(x))

Trigonometric functions of the form sin(x^p) and cos(x^p) are non-integrable unless the exponent p is the reciprocal of a positive integer. That is, if p = 1, 1/2, 1/3, 1/4, etc., then the antiderivative can be expressed in terms of elementary functions, otherwise not. The case when p = 1/2 gives you the functions sin(sqrt(x)) and cos(sqrt(x)). These functions are the primitive solutions to the differential equation

y**''** + y**'**/(2x) + y/(4x) = 0

The general solution of this differential equation is y = A*sin(sqrt(x)) + B*cos(sqrt(x)), where A and B are arbitrary constants. To integrate the functions sin(√x) and cos(√x), you must use a combination of u-substitution and integration by parts. Here we show how to find the antiderivatives of sin(√x) and cos(√x) with some examples.

## Antiderivative of Sin(Sqrt(x))

The first step is to make the substitution of variables x = u^2 and dx = 2u du. This transforms our integral into

∫ sin(sqrt(x)) dx

= ∫ 2u*sin(u) du

Next, recall the integration by parts formula:

∫ f * dg = fg - ∫ g * df

If we take f = 2u and dg = sin(u) du, we get df = 2 du and g = -cos(u). This gives us

∫ 2u*sin(u) du

= -2u*cos(u) + ∫ 2*cos(u) du

= -2u*cos(u) + 2*sin(u) + c

And now we make the reverse substitution u = sqrt(x), which gives us the final expression for the antiderivative of sin(sqrt(x)):

**∫ sin(sqrt(x)) dx**

**= -2*sqrt(x)*cos(sqrt(x)) + 2*sin(sqrt(x)) + c**

**= -2√x * cos(√x) + 2 * sin(√x) + c**

## More Integral Calculus Help

See these related integration tutorials for finding antiderivatives

## Antiderivative of Cos(Sqrt(x))

As before, the first step in integrating cos(sqrt(x)) is t0 make the substitution x = u^2 and dx = 2u du. This transforms our integral into

∫ cos(sqrt(x)) dx

= ∫ 2u*cos(u) du

And again, we use the integration by parts formula

∫ f * dg = fg - ∫ g * df

this time using the assignment f = 2u and dg = cos(u) du. This in turn gives us df = 2 du and g = sin(u). Now we have

∫ 2u*cos(u) du

= 2u*sin(u) - ∫ 2*sin(u) du

= 2u*sin(u) + 2*cos(u) + c

And finally we make the reverse substitution u = sqrt(x), which gives us the equation for the antiderivative of cos(sqrt(x)):

**∫ cos(sqrt(x)) dx**

**= 2*sqrt(x)*sin(sqrt(x)) + 2*cos(sqrt(x)) + c**

**= 2√x * sin(√x) + 2 * cos(√x) + c**

## Example 1

Find the area under the curve y = sin(sqrt(x)) from x = 0 to x = π^2. A graph of the function y = sin(sqrt(x)) is shown below with the region in question shaded in pink.

Since we know the antiderivative of sin(sqrt(x) is

-2*sqrt(x)*cos(sqrt(x)) + 2*sin(sqrt(x))

we simply need to plug in the limits of integration x = π^2 and x = 0 and subtract. This gives us

[-2*sqrt(π^2)*cos(sqrt(π^2)) + 2*sin(sqrt(π^2))] - [-2*0*cos(0) + 2*sin(0)]

= -2π(-1) + 2(0)**= 2π**

## Example 2

Find the area under the curve y = cos(2*sqrt(x)) from x = 1 to x = 3. This region is shaded in the graph below.

If we use the substitution x = w/4 and dx = (1/4) dw, we get the integral equation

∫ cos(2*sqrt(x)) dx

= (1/4) * ∫ cos(sqrt(w)) dw

= (1/2)*sqrt(w)*sin(sqrt(w)) + (1/2)*cos(sqrt(w))

= (1/2)*sqrt(4x)*sin(sqrt(4x)) + (1/2)*cos(sqrt(4x))

= sqrt(x)*sin(2*sqrt(x)) + (1/2)*cos(2*sqrt(x))

Plugging in the endpoints x = 3 and x = 1 and subtracting gives us

sqrt(3)*sin(2*sqrt(3)) + (1/2)*cos(2*sqrt(3)) - sin(2) - (1/2)*cos(2)

≈ -1.7244

## Alternative Integration Method: Easier or Harder?

Here's an alternative method of integration that uses integration by parts *first,* and then substitution. We rewrite the integral in an equivalent form as

∫ sin(sqrt(x)) dx = ∫ [ sqrt(x) ] [ sin(sqrt(x)) / sqrt(x) ] dx

Now we let f = sqrt(x) and dg = sin(sqrt(x))/sqrt(x) dx. The choice of dg is because the expression sin(sqrt(x))/sqrt(x) is recognizable as the derivative of -2*cos(sqrt(x)) if you mentally apply substitution. So we have df = 0.5*sqrt(x) dx, and g = -2*cos(sqrt(x)). Applying the integration by parts formula gives us

∫ sin(sqrt(x)) dx = ∫ f * dg = f * g - ∫ g * df

= -2*sqrt(x)*cos(sqrt(x)) + ∫ cos(sqrt(x))/sqrt(x) dx

And now applying substitution once more gives us

-2*sqrt(x)*cos(sqrt(x)) + ∫ cos(sqrt(x))/sqrt(x) dx

= -2*sqrt(x)*cos(sqrt(x)) + 2*sin(sqrt(x)) + C.

We get the same answer as before, but using a different method. Whether this alternative integration method is easier or harder depends on the individual.

## Integrating sin(x^(1/n)) and cos(x^(1/n))

To integrate sin(x^(1/n)) and cos(x^(1/n)), that is the sine and cosine of the nth root of x, you make the substitution

x = u^n, dx = n*u^(n-1),

which gives you the integral transformations

∫ sin(x^(1/n)) dx = n * ∫ sin(u) * u^(n-1) du

∫ cos(x^(1/n)) dx = n * ∫ cos(u) * u^(n-1) du

which can then be reduced with n-1 iterations of integration by parts. For example, applying this method to integrate sin(x^(1/3)) = sin(cbrt(x)), i.e., sine of the cube root of x, gives you the antiderivative formula

**∫ sin(x^(1/3)) dx = 6*sin(x^(1/3))*x^(1/3) - 3*[x^(2/3) - 2]*cos(x^(1/3)) + c**

## Comments

I do so admire you for understanding and sharing this. I am challenged in this area. About 30 years ago a friend of mine talked me into taking a class on this topic one summer. Keep in mind I had no math background beyond algebra. I got a C in the class and felt as if it equaled any A ever got. Bless you.

Angels are on the way to you this evening.

it's helpful to see the alternative method as well. almost all the problems on our practice midterm have to be solved with integration by parts and substitution combined. :/