Book works out integral of sqtr(a^2-x^2)dx as a^2/2*arcsin(x/a)+x/2*sqrt(a^2-x^2) by taking x=a sin theta, and advises to work it out using x=a cos theta. I did and got the first term as

-a^2/2*arccos(x/a)and the same second term. This means arcsin x/a=-arccos x/a which can be true for a particular case only and not in general for all values. Where am I going wrong? Kindly advise.

Don't forget the constants of integration.

-------------

A = ∫ √(a2-x2) dx

Let x = a sin(θ)
dx = a cos(θ) dθ

A = ∫ a2cos(θ)√(1-sin2(θ)) dθ

A = ∫ a2cos2(θ) dθ

A = (a2/2) ∫ (cos(2θ)+1) dθ

A = (a2/2)(sin(2θ)/2 + θ) + C1

A = (a2/2)(sin(θ)cos(θ) + θ) + C1

A = (x/2)√(a2-x2) + a2sin-1(x/a)/2 + C1

-------------------------
B = ∫ √(a2-x2) dx

Let x = a cos(θ)
dx = -a sin(θ) dθ

B = ∫ -a2sin(θ)√(1-cos2(θ)) dθ

B = ∫ -a2sin2(θ) dθ

B = -(a2/2) ∫ (1-cos(2θ)) dθ

B = -(a2/2)(θ-sin(2θ)/2) + C2

B = (a2/2)(sin(θ)cos(θ)-θ) + C2

B = (x/2)√(a2-x2) - a2cos-1(x/a)/2 + C2

Thank you very much.

When working out integrals, it's important to keep in mind the ranges of the trigonometric functions sine (sin) and cosine (cos). The identities you mentioned, arcsin(x/a) = -arccos(x/a), can be derived from the Pythagorean identity sin^2(theta) + cos^2(theta) = 1, which holds true for all values of theta. However, the range of arcsin(theta) is -pi/2 to pi/2, while the range of arccos(theta) is 0 to pi.

Let's go through the steps to see where the discrepancy in the results arises:

1. Start with the substitution x = a sin(theta):
- Substitute x = a sin(theta) into the integral to get:
∫ sqrt(a^2 - x^2) dx = ∫ sqrt(a^2 - (a sin(theta))^2) (a cos(theta)) d(theta)
= a^2/2 ∫ cos^2(theta) d(theta) + a^2/2 ∫ sin^2(theta) d(theta)

2. Evaluate the first term:
- Using the identity cos^2(theta) = 1 - sin^2(theta), rewrite the integral as:
a^2/2 ∫ (1 - sin^2(theta)) d(theta)

- Evaluate the integral:
= a^2/2 [theta - (sin(theta)cos(theta))/2] + C

- Applying x = a sin(theta):
= a^2/2 * arcsin(x/a) - (x/2) * sqrt(a^2 - x^2) + C

3. Evaluate the second term:
- The second term in the integral remains the same, x/2 * sqrt(a^2 - x^2).

Comparing the results obtained:
- First term: a^2/2 * arcsin(x/a)
- Second term: -x/2 * sqrt(a^2 - x^2)

The results obtained from the substitution x = a sin(theta) match with what the book states.

Now, if we follow the substitution x = a cos(theta) instead, let's see what happens:

1. Substitute x = a cos(theta) into the integral:
∫ sqrt(a^2 - x^2) dx = ∫ sqrt(a^2 - (a cos(theta))^2) (-a sin(theta)) d(theta)

2. Evaluate the first term:
- Using the identity sin^2(theta) = 1 - cos^2(theta), rewrite the integral as:
∫ sqrt(a^2 - (a cos(theta))^2) (-a sin(theta)) d(theta)
= -a^2/2 ∫ sin^2(theta) d(theta)

- Evaluate the integral:
= -a^2/4 [theta - (sin(theta)cos(theta))] + C

- Applying x = a cos(theta):
= -a^2/4 * arccos(x/a) - (x/2) * sqrt(a^2 - x^2) + C'

3. Evaluate the second term:
- The second term in the integral remains the same, -x/2 * sqrt(a^2 - x^2).

Comparing the results obtained:
- First term: -a^2/4 * arccos(x/a)
- Second term: -x/2 * sqrt(a^2 - x^2)

The result obtained from the substitution x = a cos(theta) differs from what the book states. The substitution x = a cos(theta) does not yield the same result as x = a sin(theta).

Therefore, it seems there may be an error in either the book or the way you performed the substitution x = a cos(theta). Double-check your calculations to ensure accuracy.