Integrating Trigonometric Functions

Post any maths and/or physics related questions here.

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

Integrating Trigonometric Functions

Postby Jetru » Mon May 02, 2005 11:46 am

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

You can't conquer the game if you can't conquer yourself.
User avatar
Jetru
 
Posts: 751
Joined: Sat Oct 18, 2003 11:46 pm
Location: Bangalore,India

Postby Alvaro » Mon May 02, 2005 12:11 pm

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

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

[/syntax]
User avatar
Alvaro
Moderator
 
Posts: 5185
Joined: Mon Sep 22, 2003 4:57 pm
Location: NY, USA

Postby Jetru » Mon May 02, 2005 1:56 pm

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

You can't conquer the game if you can't conquer yourself.
User avatar
Jetru
 
Posts: 751
Joined: Sat Oct 18, 2003 11:46 pm
Location: Bangalore,India

Postby Alvaro » Mon May 02, 2005 2:05 pm

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.
User avatar
Alvaro
Moderator
 
Posts: 5185
Joined: Mon Sep 22, 2003 4:57 pm
Location: NY, USA

Postby Big Dog » Mon May 02, 2005 2:06 pm

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 :D
Big Dog
 
Posts: 8
Joined: Wed Apr 20, 2005 9:23 pm
Location: Big Rapids, MI

Postby Zen » Mon May 02, 2005 3:00 pm

http://integrals.wolfram.com/ -> check if you have integrated correct :D
User avatar
Zen
 
Posts: 1088
Joined: Wed Sep 24, 2003 1:41 am
Location: Norway

Postby BlackDeath » Mon May 02, 2005 9:38 pm

Numerical method: Simpson's rule
Stat rosa pristina nomine, nomina nuda tenemus.
User avatar
BlackDeath
 
Posts: 107
Joined: Wed Feb 09, 2005 12:35 pm
Location: Under the full moon

Postby Jetru » Tue May 03, 2005 12:24 pm

Oh, cool thanks...

Numerical method: Simpson's rule

No offense, but doing it numerically is such a pain :?
Task Throttling!

You can't conquer the game if you can't conquer yourself.
User avatar
Jetru
 
Posts: 751
Joined: Sat Oct 18, 2003 11:46 pm
Location: Bangalore,India

Postby GeekDog » Tue May 03, 2005 12:34 pm

It's much easier to implement computationally than analytic integration :p
User avatar
GeekDog
 
Posts: 1160
Joined: Sun Sep 28, 2003 1:42 pm
Location: UK

Postby Alvaro » Tue May 03, 2005 12:42 pm

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

Especially when an analytic solution doesn't exists (like the integrals of "exp(-x^2)" and "x^x").
User avatar
Alvaro
Moderator
 
Posts: 5185
Joined: Mon Sep 22, 2003 4:57 pm
Location: NY, USA

Postby Jetru » Tue May 03, 2005 2:27 pm

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

You can't conquer the game if you can't conquer yourself.
User avatar
Jetru
 
Posts: 751
Joined: Sat Oct 18, 2003 11:46 pm
Location: Bangalore,India

Postby Jetru » Fri May 06, 2005 4:27 am

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.
Task Throttling!

You can't conquer the game if you can't conquer yourself.
User avatar
Jetru
 
Posts: 751
Joined: Sat Oct 18, 2003 11:46 pm
Location: Bangalore,India

Postby GeekDog » Fri May 06, 2005 5:50 am

Try substituting y = sin(x), and then integrate by parts. Not sure if it'll work, but it's an idea!
User avatar
GeekDog
 
Posts: 1160
Joined: Sun Sep 28, 2003 1:42 pm
Location: UK

Postby Jetru » Sat May 07, 2005 6:45 am

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

You can't conquer the game if you can't conquer yourself.
User avatar
Jetru
 
Posts: 751
Joined: Sat Oct 18, 2003 11:46 pm
Location: Bangalore,India

Postby MXP » Sat May 07, 2005 10:28 am

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

Return to Maths & Physics

Who is online

Users browsing this forum: No registered users and 0 guests

cron