Quick Integral Question: Solving \int \! \cos^2xdx with Step-by-Step Explanation

  • Thread starter iamsmooth
  • Start date
  • Tags
    Integral
In summary, Homework Statement The Attempt at a Solution Letting u = x2 and du/dx = 2x, a person is trying to solve for 2x using integration by parts and v = cosx, but is having difficulty.
  • #1
iamsmooth
103
0

Homework Statement


[tex]
\int \! \cos^2xdx[/tex]

The Attempt at a Solution


Letting u = x2 and du/dx = 2x

To get 2x into the integral, I multiply the outside by 1/2x?
[tex]
\frac{1}{2x} \int \! \cos (u) du [/tex]

[tex]
\frac{1}{2x} \sin (x^2) 2x + C[/tex]

Even if I play around with this, I don't get anywhere near the correct answer, which is:

[tex] \frac{1}{2}x + \frac{1}{4}\sin (2x) + C[/tex]

There's something I'm not getting. Can someone please help? Thanks.
 
Physics news on Phys.org
  • #2
Hi iamsmooth! :smile:

(try using the X2 tag just above the Reply box :wink:)
iamsmooth said:
There's something I'm not getting. Can someone please help? Thanks.

Yes, you're confusing (cosx)2 with cos(x2) :wink:

Try again, first using one of the standard trigonometric identities to get cos2x = a function of cos(2x) or sin(2x). :smile:
 
  • #3
Oh man, I'm an idiot... anyways...

Trying with integration by parts (failing miserably):

[tex]
\int \cos^2dx [/tex]

[tex]= \cos^2x(x) - \int 2 \cos x (x)[/tex]

[tex]
= \cos^2(x) - sin^2x(x)[/tex]

[tex]
= x(\cos^2x-sin^2x) = x(\cos2x)[/tex]

Nope, still not getting anywhere.
 
  • #4
Hi iamsmooth! :smile:

No, the integral should be 2xcosxsinx …

anyway, you can see that using v = x just makes it more complicated. :redface:

If you must use integration by parts, use v = cosx, but my idea of rewriting cos2x first is much easier.
 
  • #5
Do you mean to rewrite it as:

[tex]
\int \cos 2x + \sin^2x dx[/tex]

I can see that in this case cosx can be the derivative of sinx, does that mean I can use u-substitution and reverse chainrule this? I'm still unsure of how to tackle integrals. Like I know there's all these different ways of solving them, but I'm not sure how to identify what the situation is and thus know which method to use.

From what I would do:
1) If you see an expression and its derivative, use substitution
2) If you see polynomial, just use reverse derivative rules
3) Parts integration when all else fails?
 
Last edited:
  • #6
Hi iamsmooth! :smile:

To pass your exams, you really must learn your trigonometric identities …

in this case, cos2x = 1/2 (1 + cos(2x)) :wink:
 
  • #7
tiny-tim said:
Hi iamsmooth! :smile:

To pass your exams, you really must learn your trigonometric identities …

in this case, cos2x = 1/2 (1 + cos(2x)) :wink:

How do you derive that equation from trig identities?

[tex]
cos^2x\,+\,sin^2x\,=\,1
[/tex]

If I manipulate this, I get cos2x = 1 - sin2x which is way wrong I guess :(

I vaguely know trig identities, but I guess I'm really rusty on them... Am I supposed to just commit all of the stuff on this page: ( https://www.physicsforums.com/library.php?do=view_item&itemid=18 ) to memory?

As you can see, I guess I wrongly tried to change this:

[tex]
\cos^2x\,-\,\sin^2x\,=\,\cos2x
[/tex]

into

[tex]

\cos^2x = \cos 2x + \sin^2x dx

[/tex]

Is there an easier trick for memorizing trig identities so I can derive them when I need them?
 
  • #8
Hi iamsmooth! :smile:
iamsmooth said:
How do you derive that equation from trig identities?

cos2x + sin2x = 1
cos2x - sin2x = cos2x​
add:
2cos2x = 1 + cos2x​
subtract:
2sin2x = 1 - cos2x :wink:
I vaguely know trig identities, but I guess I'm really rusty on them... Am I supposed to just commit all of the stuff on this page: ( https://www.physicsforums.com/library.php?do=view_item&itemid=18 ) to memory?

Is there an easier trick for memorizing trig identities so I can derive them when I need them?
Sorry, but you do need to memorise all of them except the last four.

The last four are too difficult to remember, but when needed you can work them out as follows …

Sum or difference of sin always has a cos and a sin, just as in sin(A±B).

Sum or difference of cos always has two coses or two sines, just as in cos(A±B).

And a sum doesn't depend on the order, so it has to have cos the difference, which also doesn't; while a difference does, so it has to have sin the difference, which also does. :wink:
 
  • #9
I'll start trying to remember them then.

Anyways this is what I have:

[tex] \int \cos^2xdx = \int \frac{1+\cos 2x}{2}dx[/tex]

Letting:
[tex]u = 2x, du = 2dx, \frac{1}{2}du = dx[/tex]

[tex]\int 1 + \cos (u) \frac{1}{2}du[/tex]

[tex]
= \frac{1}{2} \int 1 + \cos (u) du[/tex]

[tex]
= \frac{1}{2} [ x + \sin 2x ] + K[/tex]

[tex]
= \frac{x}{2} + \frac{\sin(2x)}{2} + K[/tex]

I'm close to the right answer, but the second term should be [tex] \frac{\sin(2x)}{4} [/tex], where did I mess up? If I raise the u inside the cose by 1 exponent and divide, I get 1/4 but the exponent remains... not sure what's wrong here.

Thanks.
 
  • #10
Hi iamsmooth! :smile:

You messed up twice :redface:
iamsmooth said:
[tex]\int 1 + \cos (u) \frac{1}{2}du[/tex]

You've left out the 2 in the original denominator.
[tex]
= \frac{1}{2} \int 1 + \cos (u) du[/tex]

[tex]
= \frac{1}{2} [ x + \sin 2x ] + K[/tex]

And you've left out a whole line, which is a really bad idea, especially since in this case you've made a mistake in the process …

the integral of 1du is u (=2x), not x. :wink:
 
  • #11
[tex] \int \cos^2xdx = \int \frac{1+\cos 2x}{2}dx = \int (\frac{\cos2x}{2}+\frac{1}{2})dx[/tex]

I was trying to group the +1/2 with the dx to remove it, but I guess you can't do that. Why is the integral of du = 2x?

I let u = 2x, so the derivative would be du/dx = 2, which would make du = 2dx. I understand 2x would be the correct answer since the math works out, but I don't seem to be getting that for some reason.

Is it the [itex]+\frac{1}{2}[/itex] term that becomes 2x? I got 1 = x (without denominator) because I just took the antiderivative.
 
Last edited:
  • #12
Hi iamsmooth! :smile:

(just got up :zzz: …)
iamsmooth said:
… Why is the integral of du = 2x?

I let u = 2x, so the derivative would be du/dx = 2, which would make du = 2dx. I understand 2x would be the correct answer since the math works out, but I don't seem to be getting that for some reason.

Yes, du = 2dx. :smile:

Now integrate that … ∫du = ∫2dx, which is the same as ∫du = 2x (+ constant). :wink:

I can't help feeling that if you wrote it out with the missing line inserted, you'd automatically get the right answer.
 
  • #13
Okay, I think I got this:

[tex]
\int \cos^2xdx = \int \frac{1+\cos 2x}{2}dx = \int (\frac{\cos2x}{2}+\frac{1}{2})dx
[/tex]

Moving the 1/2 to the side:
[tex] \frac{1}{2} \int \cos2x + 1[/tex]

Now keeping in mind that u = 2x, du = 2dx, 2du = dx, I can do the substitution:
[tex]\frac{1}{4} \int \cos(u) + 2du[/tex]
(Placing another 1/2 to the left of the integral to balance out the 2du)

Now evaluating the integral:
[tex]
\frac{1}{4}\sin(u) + 2x[/tex]

Subbing back in the value of u, and simplifying:
[tex]
\frac{\sin(2x)}{4} + \frac{x}{2}[/tex]

I hope that's right. I just wasn't sure if the way I inserted the 2du was a legal move. Appreciate all the help, tiny-tim :D
 
  • #14
Yes, that's ok, except

i] about half-way down you got bored, and started leaving out the dx or du …

you must keep them in …

an ∫ is meaningless without a d(something) after it (and you'll lose marks in the exam unless the examiner thinks it's a typo), and if you keep them in you're much less likely to make a mistake (eg a factor of 2) when you change variables

ii] you never needed to substitute for the ∫ 1/2 dx, did you? :wink:

iii] don't say "keeping in mind" :rolleyes: … say "putting (or "let") u = 2x, du = 2dx"

So the whole thing should look like:

∫cos2x dx

= ∫(1 + cos2x)/2 dx

putting u = 2x. du = 2dx,

= x/2 + constant + ∫ 1/4 cosu du

= x/2 + constant + 1/4 sinu

= x/2 + 1/4 sin2x + constant :wink:
 

What is a quick integral?

A quick integral is a mathematical calculation that determines the area under a curve or the volume of a three-dimensional shape.

Why are integrals important in science?

Integrals are important in science because they allow us to analyze and understand complex systems and phenomena. They are used in fields such as physics, chemistry, engineering, and economics.

How do you solve a quick integral?

To solve a quick integral, you need to follow a specific set of steps called integration techniques. These techniques involve identifying the function to be integrated, applying a proper integration rule, and then simplifying the resulting expression until you reach a final answer.

What are the different types of integrals?

The main types of integrals are definite and indefinite integrals. Definite integrals have specific limits of integration, while indefinite integrals do not. Other types include improper integrals, line integrals, surface integrals, and multiple integrals.

Why is it important to check your answer when solving an integral?

It is crucial to check your answer when solving an integral to ensure that you have not made any mistakes along the way. Integrals can be complex and involve multiple steps, so a small error can result in a significantly different answer. Checking your answer also helps to improve your understanding of the concept and identify any areas where you may need further practice.

Similar threads

  • Calculus and Beyond Homework Help
Replies
15
Views
785
  • Calculus and Beyond Homework Help
Replies
22
Views
1K
  • Calculus and Beyond Homework Help
Replies
19
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
838
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
343
  • Calculus and Beyond Homework Help
Replies
5
Views
782
  • Calculus and Beyond Homework Help
Replies
9
Views
723
  • Calculus and Beyond Homework Help
Replies
14
Views
960
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
Back
Top