Where Did I Go Wrong in Solving This Integral Using Substitution?

  • Context: MHB 
  • Thread starter Thread starter Yankel
  • Start date Start date
  • Tags Tags
    Computer Integration
Click For Summary

Discussion Overview

The discussion revolves around the integration of the function sin(x)cos(x) using substitution methods. Participants explore different approaches to solving the integral and the implications of constant terms in their results.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant initially solves the integral using the substitution u=sin(x), leading to an expression of sin(x)^2/2.
  • Another participant points out that both solutions differ by a constant, suggesting they are equivalent from a calculus perspective.
  • A later reply elaborates on the periodic nature of trigonometric functions, indicating that different forms can represent the same integral.
  • Another participant presents an alternative method involving a double angle identity, leading to a different expression that also differs by a constant.

Areas of Agreement / Disagreement

Participants generally agree that the different forms of the integral represent the same value when considering the constant of integration, but they explore multiple approaches and expressions without reaching a consensus on a single preferred method.

Contextual Notes

Participants note the importance of considering the constant of integration when comparing results, as well as the potential for different expressions to be equivalent due to trigonometric identities.

Yankel
Messages
390
Reaction score
0
Hello,

I was trying to solve the integral of

sin(x)*cos(x)

using the substitution method, what I did was:

u=sin(x) and that yields du/dx = cos(x) and then du=cos(x)*dx

that comes to an integral of u*du, which is easy u^2 / 2 +C. substituting back gives the final answer

sin(x)^2 / 2

But, when I ran this integral in both Maple and Mathematica, I got this answer:

-cos(x)^2 / 2

Now I tried asking Maple if the two answers are the same, but it failed. I tried checking myself, using the relation sin(x)^2+cos(x)^2=1, and got to the conclusion that they don't. I don't see what I did wrong here...
 
Physics news on Phys.org
Technically, you answer was not $\sin^{2}(x)/2$, but $\sin^{2}(x)/2+C.$ Likewise, the computer's answer was not $-\cos^{2}(x)/2$, but $-\cos^{2}(x)/2+C$. Since your two answers differ by a constant (namely, $1$), they are really the same answer from a calculus perspective.
 
Ackbach said:
Technically, you answer was not $\sin^{2}(x)/2$, but $\sin^{2}(x)/2+C.$ Likewise, the computer's answer was not $-\cos^{2}(x)/2$, but $-\cos^{2}(x)/2+C$. Since your two answers differ by a constant (namely, $1$), they are really the same answer from a calculus perspective.

Or more clearly, $C_1$ and $C_2$. This happened to me a while ago, it tends to occur a lot with trigonometric functions because of their periodic identities, so you often end up with very different looking expressions which are in fact equal.. :confused:
 
ah, I wasn't thinking about it...interesting.

well done to both of you ! thanks ! :)
 
Just to be cheeky about it:
\int sin(x)~cos(x) dx = \frac{1}{2} \int 2 sin(x)~cos(x) dx = \frac{1}{2} \int sin(2x)dx

After u = 2x:
= \int sin(x)~cos(x) dx = \frac{1}{2} \int sin(u) \cdot \frac{1}{2} du

= -\frac{1}{4} cos(u) + C = -\frac{1}{4} cos(2x) + C

and upon using cos(2x) = cos^2(x) - sin^2(x)
\int sin(x)~cos(x) dx = \frac{1}{4} \left ( sin^2(x) - cos^2(x) \right ) + C

which contains both your sin and cos terms and is also off by a constant from the other solutions. (Nerd)

-Dan
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 17 ·
Replies
17
Views
5K
  • · Replies 21 ·
Replies
21
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K