## Integrating Trigonometric Functions

Post any maths and/or physics related questions here.

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

### Integrating Trigonometric Functions

How do i integrate trigonometric functions? Say 'cosec x'?Is there some general process to follow?

You can't conquer the game if you can't conquer yourself.

Jetru

Posts: 751
Joined: Sat Oct 18, 2003 11:46 pm
Location: Bangalore,India

[syntax="cpp"]#include <cmath>

double cosec(double x){
return 1/std::sin(x);
}

[/syntax]

Alvaro
Moderator

Posts: 5185
Joined: Mon Sep 22, 2003 4:57 pm
Location: NY, USA

That's not integration. I'm not talking about C++. I'm talking about normal mathematical integration.

You can't conquer the game if you can't conquer yourself.

Jetru

Posts: 751
Joined: Sat Oct 18, 2003 11:46 pm
Location: Bangalore,India

Jetru wrote:That's not integration. I'm not talking about C++. I'm talking about normal mathematical integration.

Ooops! I'm sorry. Software engineers often say "integrate" meaning "add something to an existing program". Yeah, this question makes much more sense. Unfortunately, I never liked finding primitives and I don't even remember the few tricks that I managed to learn.

Alvaro
Moderator

Posts: 5185
Joined: Mon Sep 22, 2003 4:57 pm
Location: NY, USA

http://tutorial.math.lamar.edu/AllBrows ... thTrig.asp

Hope that helps for some. If i remember correclty, which I may not, if you have the cosec x, you change it to 1/sin(x) and then intrigrate from there.

http://people.hofstra.edu/faculty/Stefa ... trig4.html

here is another site that has more rules for you and even shows the intregral of cosec x
Big Dog

Posts: 8
Joined: Wed Apr 20, 2005 9:23 pm
Location: Big Rapids, MI

http://integrals.wolfram.com/ -> check if you have integrated correct

Zen

Posts: 1088
Joined: Wed Sep 24, 2003 1:41 am
Location: Norway

Numerical method: Simpson's rule
Stat rosa pristina nomine, nomina nuda tenemus.

BlackDeath

Posts: 107
Joined: Wed Feb 09, 2005 12:35 pm
Location: Under the full moon

Oh, cool thanks...

Numerical method: Simpson's rule

No offense, but doing it numerically is such a pain

You can't conquer the game if you can't conquer yourself.

Jetru

Posts: 751
Joined: Sat Oct 18, 2003 11:46 pm
Location: Bangalore,India

It's much easier to implement computationally than analytic integration

GeekDog

Posts: 1160
Joined: Sun Sep 28, 2003 1:42 pm
Location: UK

GeekDog wrote:It's much easier to implement computationally than analytic integration

Especially when an analytic solution doesn't exists (like the integrals of "exp(-x^2)" and "x^x").

Alvaro
Moderator

Posts: 5185
Joined: Mon Sep 22, 2003 4:57 pm
Location: NY, USA

Never knew x^x had no analytic soln. I was actually trying that a week ago...

You can't conquer the game if you can't conquer yourself.

Jetru

Posts: 751
Joined: Sat Oct 18, 2003 11:46 pm
Location: Bangalore,India

How do I integrate (sin x)^n with respect to x? Don't want the answer, just the hints. Tried Parts... and it didn't look very pretty.

You can't conquer the game if you can't conquer yourself.

Jetru

Posts: 751
Joined: Sat Oct 18, 2003 11:46 pm
Location: Bangalore,India

Try substituting y = sin(x), and then integrate by parts. Not sure if it'll work, but it's an idea!

GeekDog

Posts: 1160
Joined: Sun Sep 28, 2003 1:42 pm
Location: UK

Um...Turns out the integral of (sin x)^n is recursive. Oh well.

You can't conquer the game if you can't conquer yourself.

Jetru

Posts: 751
Joined: Sat Oct 18, 2003 11:46 pm
Location: Bangalore,India

That can be a good thing. If you know that integrating one side eventually will give you a term that looks like the original integral then you can use that like this:

int(f(x)) = a0(x) + a1(x) + a2(x) + ... + an(x) - int(f(x))
2int(f(x)) = a0(x) + a1(x) + a2(x) + ... + an(x)
int(f(x)) = 1/2 * (a0(x) + a1(x) + a2(x) + ... + an(x))

The functions ai(x) are functions that you found in the process of integration (for instance, while using integration by parts).
Need information on a function I've posted? Chances are it's at the MSDN.
MXP

Posts: 6506
Joined: Mon Sep 22, 2003 5:27 pm

Next