Consider the following indefinite integral.

I= ∫ tan(x)sec^2(x) dx
Part 1 of the question was to evaluate I using substitution, u=sec(x)
my answer: (sec^2(x))/2 +C
Part 2: evaluate I using substitution, u=tan(x)
my answer: tan^2(x)/2 + C

Part 3 is to explain why the solutions to parts 1 and 2 are seemingly different.
I would like to know whether my answers for part 1 and 2 are correct and would like help with explaining in part 3.

it's that pesky C

sec^2 = tan^2 + 1

Your answer for Part 1 is correct: ∫ tan(x)sec^2(x) dx = (sec^2(x))/2 + C.

However, your answer for Part 2 is not correct. Let's go through the steps of integrating using the substitution u = tan(x) and correct the answer.

Step 1: Substitute u = tan(x) and find the differential du.
Since u = tan(x), we can differentiate both sides with respect to x:
du/dx = sec^2(x)
Rearranging, we have du = sec^2(x) dx.

Step 2: Substitute the expression for du into the integral.
∫ tan(x)sec^2(x) dx = ∫ u du

Step 3: Evaluate the integral.
Taking the integral of u with respect to u gives us:
∫ u du = u^2/2 + C

Step 4: Substitute back u = tan(x) to obtain the final answer.
u^2/2 + C = (tan^2(x))/2 + C

Therefore, the correct answer for Part 2 is (tan^2(x))/2 + C.

Now, let's analyze why the solutions to parts 1 and 2 are seemingly different.
In Part 1, you made the correct substitution u = sec(x). This led to du = sec^2(x) dx, which helped simplify the integral. By integrating du, you obtained the answer (sec^2(x))/2 + C.

In Part 2, you substituted u = tan(x). However, you didn't correctly account for the change in variable when finding the differential du. Instead of du = tan(x) dx, it should be du = sec^2(x) dx. This led to a different integral, and hence a different solution. The correct answer for Part 2 is (tan^2(x))/2 + C.

In summary, the discrepancy between the solutions in Part 1 and Part 2 arises from the different substitutions made. The choice of substitution is crucial, and it affects both the form of the integral and the resulting solution. In this case, the correct substitution led to the correct solution in Part 1, but an incorrect substitution led to an incorrect solution in Part 2.