Integral (sin x/2 - cos x/2)^2

In summary, the integral can be solved by using the identity 1-2sin^2(θ)=cos(2θ). The final answer is x+cos(x)+C, or x+cos(x)-1+C, where C is an arbitrary constant.
  • #1
b0rsuk
5
0

Homework Statement



I'm unable to solve this integral. I get a result, but it doesn't match the solution.

\int(sin \frac{x}{2} - cos \frac{x}{2})^2 \mathrm{dx}
[tex]\int(sin \frac{x}{2} - cos \frac{x}{2})^2 \mathrm{dx}[/tex]

The Attempt at a Solution


CodeCogsEqn_gif_300x300_q85.jpg

(attachment?)
I'd be grateful for highligting my errors.
 

Attachments

  • CodeCogsEqn.gif
    CodeCogsEqn.gif
    5.9 KB · Views: 5,351
Physics news on Phys.org
  • #2
You didnt do the substitution properly.
And there is no need for substitution. Note the identity: [itex]\sin(2x)=2\sin x \cos x[/itex]
 
  • #3
2sin(x)cos(x) = sin(2x)dx

∫ [2sin(x)] [cos(x)dx] = sin2(x)
∫ [-2cos(x)] [-sin(x)dx] = -cos2(x)
∫ sin(2x)dx = -(1/2)cos(2x)
 
  • #4
b0rsuk said:

Homework Statement



I'm unable to solve this integral. I get a result, but it doesn't match the solution.

\int(sin \frac{x}{2} - cos \frac{x}{2})^2 \mathrm{dx}
[tex]\int(sin \frac{x}{2} - cos \frac{x}{2})^2 \mathrm{dx}[/tex]

The Attempt at a Solution


CodeCogsEqn_gif_300x300_q85.jpg

(attachment?)
I'd be grateful for highligting my errors.

Hint: simplify with the double-angle formula first.
sin(2z) = 2(sinz)(cosz)

Now put z = (1/2)x and see what you get on the RHS. What do you get on the LHS? Integrate that.
 
  • #5
Hello b0rsuk. Welcome to PF !

What is the correct answer?
 
  • #6
Hmm. In such case,
[tex]2 \int \sin \frac{x}{2} \cos \frac{x}{2} dx = \int 2 \sin \frac{x}{2} \cos \frac{x}{2} dx = \int \sin x dx = -\cos x + C_1[/tex]

But what about the first integral ? I know:
[tex]\sin^2 x + \cos^2 x = 1[/tex]
But I have:
[tex]\int\sin^2 \frac{x}{2} + \cos^2\frac{x}{2} dx[/tex]
Can I simply get around that with substitution ? Say,
[tex]\frac{x}{2} = t, \frac{1}{2} = dt[/tex]
Then I get
[tex]\frac{1}{2}(\sin^2 t + \cos^2 t)[/tex]
Does it equal 1 (or, actually, 1/2) ?
--------------------------

The solution, according to the book:
[tex]x + \cos x + C[/tex]
Yes, that's a plus.

---------------
You people are scary. I'm a CS graduate and I came here to defeat my arch-nemesis, math. This time, without time pressure. You rob me of any excuses I might have to procrastinate solving examples.
 
  • #7
b0rsuk said:
Hmm. In such case,
[tex]2 \int \sin \frac{x}{2} \cos \frac{x}{2} dx = \int 2 \sin \frac{x}{2} \cos \frac{x}{2} dx = \int \sin x dx = -\cos x + C_1[/tex]

But what about the first integral ? I know:
[tex]\sin^2 x + \cos^2 x = 1[/tex]
But I have:
[tex]\int\sin^2 \frac{x}{2} + \cos^2\frac{x}{2} dx[/tex]
Can I simply get around that with substitution ? Say,
[tex]\frac{x}{2} = t, \frac{1}{2} = dt[/tex]
Then I get
[tex]\sin^2 t + \cos^2 t[/tex]
Does it equal 1 ?
--------------------------

The solution, according to the book:
[tex]x + \cos x + C[/tex]
Yes, that's a plus.

---------------
You people are scary. I'm a CS graduate and I came here to defeat my arch-nemesis, math. This time, without time pressure. You rob me of any excuses I might have to procrastinate solving examples.

[itex]\sin^2x + \cos^2x = 1[/itex] is an identity. Meaning the value of x can be *anything*. Even if you replace the x with x/2, it still holds (just to be clear, that means [itex]\sin^2 \frac{x}{2} + \cos^2 \frac{x}{2} = 1[/itex]). Don't bother with substitution, etc. Just recognise this and reduce the integrand to 1 first.

So the first integrand is 1, and the integral is x.

The second integrand is [itex]-\sin x[/itex] (you correctly reflected the minus sign in your first post, but then you must have forgotten it in your most recent one). The integral is [itex]\cos x[/itex].

So the final answer is [itex]x + \cos x + C[/itex].
 
Last edited:
  • #8
In this case, simple trig substitutions are all you need.
[tex]\left(\sin\frac x 2 - \cos \frac x 2\right)^2 = 1 - \sin x[/tex]
This is an identity, so [itex]\int (\sin x/2 - \cos x/2)^2 dx = \int (1-\sin x)\,dx[/itex]. The right hand side obviously integrates to [itex]x+\cos x + c[/itex].

So how to arrive at that identity?One way is to expand the square,
[tex]\left(\sin\frac x 2 - \cos \frac x 2\right)^2 =
\sin^2 \frac x 2 - 2 \sin \frac x 2 \cos \frac x 2 + \cos^2 \frac x 2[/tex]
Now use the identities [itex]\sin^2 \theta + \cos^2\theta = 1[/itex] and [itex]\sin(2\theta) = 2 \sin\theta\cos\theta[/itex] to arrive at the desired identity
[tex]\left(\sin\frac x 2 - \cos \frac x 2\right)^2 = 1 - \sin x[/tex]

Another way is to use the identity [itex]\sin\theta- \cos \theta = \sqrt 2 \sin(\theta-\pi/4)[/itex]. This comes in handy at times, but doesn't quite fall into the camp of identities you should just "know". With this,
[tex]\left(\sin\frac x 2 - \cos \frac x 2\right)^2 = 2\sin^2\left(\frac x 2 - \frac \pi 4\right) = 2\sin^2\left(\frac 1 2(x-\pi/2)\right)[/tex]
Now use the half-angle formulae [itex]2\sin^2(u/2) = 1-\cos u[/itex]. The half-angle formulae come into play quite often. With this,
[tex]\left(\sin\frac x 2 - \cos \frac x 2\right)^2 = 1-\cos\left(x-\frac{\pi} 2\right) = 1 - \sin x[/tex]
 
  • #9
b0rsuk said:

Homework Statement



I'm unable to solve this integral. I get a result, but it doesn't match the solution.

\int(sin \frac{x}{2} - cos \frac{x}{2})^2 \mathrm{dx}
[tex]\int(sin \frac{x}{2} - cos \frac{x}{2})^2 \mathrm{dx}[/tex]

The Attempt at a Solution


CodeCogsEqn_gif_750x750_q85.jpg

(attachment?)
I'd be grateful for highlighting my errors.
After splitting this up into two integrals, the first one is fine.

You then made offsetting errors -- or simply had a typo.
[itex]\displaystyle -2\int\left(\sin\left(\frac{x}{2}\right)\cos\left( \frac{x}{2}\right)\right)dx=-4\int\left(\frac{1}{2}\sin\left(\frac{x}{2}\right)cos\left(\frac{x}{2}\right)\right)dx[/itex]
[itex]\displaystyle=-4\int\left(\sin(t)\cos(t)\right)dt[/itex]​
After that you dropped a minus sign.

So, the final answer should be [itex]\displaystyle x-2\sin^2\left(\frac{x}{2}\right)+C[/itex]

I know that's not the book's answer, but notice that
[itex]1-2\sin^2(\theta)=\cos(2\theta)[/itex]

So substituting x/2 for θ and doing a bit of algebra gives

[itex]\displaystyle -2\sin^2\left(\frac{x}{2}\right)=\cos(x)-1[/itex]​

Therefore, [itex]\displaystyle x-2\sin^2\left(\frac{x}{2}\right)+C=x+\cos(x)-1+C[/itex]

-1+C is just a constant, one unit less than C.

So, your answer was correct except for a sign error.
 

Attachments

  • CodeCogsEqn_gif_750x750_q85.jpg
    CodeCogsEqn_gif_750x750_q85.jpg
    13.9 KB · Views: 3,054

1. How is "Integral (sin x/2 - cos x/2)^2" solved?

The integral of (sin x/2 - cos x/2)^2 can be solved using the trigonometric identity (sin x/2 - cos x/2)^2 = 1 - cos x. This simplifies the integral to the form ∫ 1 - cos x dx, which can be easily solved using integration by parts or substitution.

2. What is the purpose of calculating the integral of (sin x/2 - cos x/2)^2?

The integral of (sin x/2 - cos x/2)^2 is often used in physics and engineering to solve problems involving oscillatory motion or AC circuits. It can also be used to find the area under the curve of the function (sin x/2 - cos x/2)^2.

3. Can the integral of (sin x/2 - cos x/2)^2 be solved using other methods?

Yes, the integral of (sin x/2 - cos x/2)^2 can also be solved using the trigonometric identity (sin x/2 - cos x/2)^2 = (sin^2(x/2) + cos^2(x/2)) - 2(sin(x/2)cos(x/2)), which simplifies the integral to the form ∫ (sin^2(x/2) + cos^2(x/2)) - 2(sin(x/2)cos(x/2)) dx. This can also be solved using integration by parts or substitution.

4. Are there any special cases when solving the integral of (sin x/2 - cos x/2)^2?

Yes, if the limits of integration are 0 and π, the integral of (sin x/2 - cos x/2)^2 simplifies to π. This is because the function (sin x/2 - cos x/2)^2 has a period of π, and integrating over one period will result in the area under the curve being equal to the period itself.

5. Are there any real-world applications of the integral of (sin x/2 - cos x/2)^2?

Yes, the integral of (sin x/2 - cos x/2)^2 is commonly used in signal processing to analyze and manipulate signals in AC circuits. It is also used in physics to calculate the energy of oscillatory systems.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
237
  • Calculus and Beyond Homework Help
Replies
15
Views
735
  • Calculus and Beyond Homework Help
Replies
2
Views
836
  • Calculus and Beyond Homework Help
Replies
11
Views
623
  • Calculus and Beyond Homework Help
Replies
3
Views
474
  • Calculus and Beyond Homework Help
Replies
7
Views
606
  • Calculus and Beyond Homework Help
Replies
5
Views
596
  • Calculus and Beyond Homework Help
Replies
6
Views
489
  • Calculus and Beyond Homework Help
Replies
22
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
431
Back
Top