Closed Thread Icon

Topic awaiting preservation: tan (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=7051" title="Pages that link to Topic awaiting preservation: tan (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: tan <span class="small">(Page 1 of 1)</span>\

 
wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 10-14-2003 18:45

I have no idea where ot post this, but you guys seem to be pretty much legends at everyhting. Please can you help me ith this question? I know that sin cos and tan are workled out by polwer series and I know that tan(x) is sin(x)/cos(x), but I really need to know how to work out tan directly. Please can you help me?
Thanks in advance

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 10-14-2003 18:53

I'm not sure what you are asking. Do you want to know the Taylor, or McLauren series to calculate tan. If so this sounds like you are asking for help doing your homework.

I don't think most programmers use the series calculations to calculate tan. They converge too slowly. Most of the time you would write a function to calcualte sin and use it to calculate both cos and tan.

If you could be a little more specific with your question, we might be able to give you an answer.

-- not necessarily stoned... just beautiful.

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 10-14-2003 18:58

Asking for help with my homework? Me? never! Well, maybe...
Ok, given a degree, say 15, I just want to know how to work out tan(15). Please could anybody help?

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 10-14-2003 19:05

First, you have to calculate any of the fundamental functions using degrees in radians.

15 degrees => 15 * pi / 180 = 0.2617993875 radians

Use the Taylor series to find a series for the tangent function and sustitue 0.2617993875 into the series.

If you want more help than that you're going to have to ask a specific question.




-- not necessarily stoned... just beautiful.

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 10-14-2003 19:10

I know that for sin and cos there are things like x+x^3/3x+x^5/5x... or something like that. I just want to know what the equivalent is for tan. Im sorry if Im not being precise enough- I don't know how to be!

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 10-14-2003 19:15

The equation you sited is derived from the MacLauren series. I would have to get our a math book to look up the exact procedure for deriving the series.

You can use the Taylor series to derive a series for any function. MacLauren often converge faster than Taylor so most series are derived from MacLauren.

If you want to discuss how to derive a MacLauren series, we can discuss it. I will have to get out my calculus book to refresh my memory on it and the discussion will probably take a while. (You might be better off trying to discuss this with someone in person)

But before we continue. I need to know why you are asking the question.




-- not necessarily stoned... just beautiful.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-14-2003 19:27

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

SPyX
Bipolar (III) Inmate

From: College Station, TX
Insane since: Aug 2002

posted posted 10-14-2003 20:39

nm

[This message has been edited by SPyX (edited 10-14-2003).]

Veneficuz
Paranoid (IV) Inmate

From: A graveyard of dreams
Insane since: Mar 2001

posted posted 10-14-2003 20:58

Ini: like you said, a method using the unit circle would require sin and cos to work and that kind of defeats the purpose...

wrayal: Don't have time to do the exact maths for you now, but the way to calculate a Taylor polynom for a function is:

f(x) = f(a) + f'(a)*(x-a) + ( f''(a) * (x-a)^2 ) / 2! + ( f'''(a) * (x-a)^3 ) / 3! + ...

Where x is the point in the function you want to find and a is the point you're evaluting around. Set a=0 to get the MacLaurin series.

The only problem with solving tan using this formula is that the derivates of tan get complicated after a while...
f(x) = tan x
f'(x) = (sec x)^2
f''(x) = 2(sec x) * (sec x) * (tan x)
...

Hope that helps


_________________________
"There are 10 kinds of people; those who know binary, those who don't and those who start counting at zero"
- the Golden Ratio -

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 10-14-2003 21:04

I would suggest just using the sin(x)/cos(x) method until you learn how to do a MacLauren series on your own (which you should learn/have learned in a second semester of calculus).

quote:
MacLauren often converge faster than Taylor so most series are derived from MacLauren.



If I remember right, MacLauren is just a special case of Taylor, where the convergence is based around x=0. So I don't think It would be significantly faster than Taylor (unless you're counting the extra subtraction as a slow step, which I guess would make it slightly slower).

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 10-14-2003 22:54

wow, I don't know what the fuck *ya'll* are talking about....

*sipps some Tang*


Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

jdauie
Bipolar (III) Inmate

From: Missoula, MT
Insane since: Jan 2003

posted posted 10-15-2003 01:21

The actual values of the Taylor series for tan(x) start like this:

x+1/3*x^3+2/15*x^5+17/315*x^7+62/2835*x^9...

You should be able to figure out how the numbers are derived.

[This message has been edited by jdauie (edited 10-15-2003).]

Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 10-15-2003 01:30

Pet, I think it's something to do with getting a tan.


MindBender
Paranoid (IV) Inmate

From: a pocket dimention...
Insane since: Sep 2002

posted posted 10-15-2003 02:00

Is that like beige?


It's only after we've lost everything...
That we're free to do anything...

iconoclast
Paranoid (IV) Inmate

From: SM Megamall
Insane since: May 2003

posted posted 10-15-2003 04:21

i only got the most easiest way to remember tan's, cos', and sin's formulae.

Through this phrase:
Some Old Hags Can't Always Hide Their Old Age.

*capital letters' meanings:
S= sin; C= cos; T= tan
O= opposite side; A= adjacent side; H= hypotenous

---------------------------
Don't Pick On Me.

« BackwardsOnwards »

Show Forum Drop Down Menu