how to take the integral of cos(square root of x) dx.

need to use substitution and integration by parts but I don't know what to substitute

let t = x^.5

dt = .5 x^-.5 dx
so dx = 2 x^.5 dt which is dx = 2 t dt

so integral of 2 t cos t dt

that might help

(Integral of) cos x^(1/2) dx

Do the substitution part first.
Let x^(1/2) = y
x = y^2
dx = 2y du
So the integral becomes, after substitution
2*(Integral of)y cos y dy
Now use integration by parts. You may have to use it twice.
You should end up with
2 cos y + y sin y
Then substitute back x in terms of y
= 2 cos(sqrt x) + 2sqrt x * sin(sqrt x)

integral of 2 t cos t dt

let u = 2 t
so du = 2 dt
let dv = cos t dt
so v = sin t

u v = 2 t sin t

v du = 2 sin t dt

u v - integral v du
= 2 t sin t + 2 cos t

Remarkable :) LOL

To integrate the function cos(sqrt(x)), you are correct that substitution and integration by parts are the common techniques to use. Let's start by choosing an appropriate substitution.

Let u be the expression under the square root, u = sqrt(x). Let's find the derivative of u with respect to x, du/dx.

Taking the derivative of both sides of the equation u = sqrt(x), we get:

du/dx = (1/2)(x^(-1/2))

Now, solve for dx in terms of du:

dx = 2(sqrt(x)) du

Now substitute u and dx in terms of u into the original integral:

∫cos(sqrt(x)) dx = ∫cos(u) * 2(sqrt(x)) du

Since x = u^2, we can rewrite sqrt(x) as u:

∫cos(u) * 2u du

Now, let's integrate this expression using integration by parts.

Using the formula for integration by parts: ∫u * v dx = u * ∫v dx - ∫(u' * ∫v dx) dx, where u' is the derivative of u.

For our integral, let's choose u = cos(u) (since the derivative of cos is -sin), and dv = 2u du.

Now, let's calculate du and v:

du = -sin(u) du
v = ∫2u du = u^2

Substituting into the integration by parts formula, we get:

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

Now, we have a new integral to solve: ∫(-sin(u) * u^2) du. We can use integration by parts again on this integral.

Choosing u = u^2 (since the derivative of u^2 is 2u), and dv = -sin(u) du, we can find du and v:

du = 2u du
v = ∫-sin(u) du = cos(u)

Substituting into the integration by parts formula, we get:

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

Now, we are left with another integral: ∫(2u * cos(u)) du. This integral can be solved using integration by parts once again.

Choosing u = 2u (since the derivative of 2u is 2), and dv = cos(u) du, we can find du and v:

du = 2 du
v = ∫cos(u) du = sin(u)

Substituting into the integration by parts formula, we get:

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

The integral of 2 * sin(u) is -2 * cos(u). Substituting back into the expression, we get:

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

Now, we can substitute back the original value of u:

∫cos(sqrt(x)) dx = 2(sqrt(x)) * sin(sqrt(x)) + 2 * cos(sqrt(x)) + C

Thus, the integral of cos(sqrt(x)) dx is 2(sqrt(x)) * sin(sqrt(x)) + 2 * cos(sqrt(x)) + C, where C is the constant of integration.