1. ## ArcTan(x,y) formula

Hi,

I have a working example (below) but have no idea how it works:

α = arctan(sin(12.0321°) * cos(23.45°), cos(12.0321°)) = 11.0639°

Incidentally, in order to calculate sin and cos (in VB Code) I have to convert the degrees to radians first - will this mess up the output or can I just convert it back into degrees again?

Thanks for looking,

Chris.

2. Originally Posted by Chris147

I have a working example (below) but have no idea how it works:

α = ArcTan(sin(12.0321°) * cos(23.45°), cos(12.0321°)) = 11.0639°

Incidentally, in order to calculate sin and cos (in VB Code) I have to convert the degrees to radians first - will this mess up the output or can I just convert it back into degrees again?
This is a weird definition of ArcTan, certainly not a standard one. Normally, arctan is a function of one variable, not two, and arctan(x) basically means the angle whose tangent is x. I'll refer to this function of one variable as arctan (with lower case a and t) to distinguish it from that function ArcTan of two variables.

If you work out sin(12.0321°) * cos(23.45°), it comes to 0.1912425; and cos(12.0321°) is 0.9780309. So we are told that ArcTan(0.1912425,0.9780309) = 11.0639°. What I found by trial and error is that if I divide 0.1912425 by 0.9780309 it comes to 0.1955383. Then when I press the $\tan^{-1}$ button on my calculator (remember that $\tan^{-1}$ is just another name for arctan), it gives the answer as 11.0639°, which is what we want.

So it seems to me as though your ArcTan is related to the conventional arctan by the relation ArcTan(x,y) = arctan(x/y).

3. ## ArcTan(x/y) not (x,y)

Hi Opalg

First of all, thank you.

I don't think I would have figured that out in a month of Sundays.

All I need to do now is create a ArcTan function (of the standard ArcTan(x) variety) - unfortunately Access VBA doesn't support or list it in the derived Math Functions). This shouldn't prove too difficult though - I've already done the same ArcSin and ArcCos.

If anyone has an outline of how ArcTan(x) is calculated I'd appreciate it, meanwhile - thanks again, your help is greatly appreciated.

Chris.

4. If you already have a function that determines arcsin(x), then you can determine arctan(x) as follows:

arctan(x) = arcsin (x/sqrt(x^2+1))

For example: arctan(3/4) = arcsin[(3/4)/(5/4)] = arcsin(3/5)

Another approach would be to use the sequence:

arctan(x) = x - (x^3)/3 + (x^5)/5 - (x^7)/7 + ...

which converges for x<=1. If x>1, just remember that arctan(x) = pi/2-arctan(1/x).

5. ## ArcTan Formula

Thanks ebaines,

that's pretty much fixed the whole thing :-).

Thanks also to the Math Help Forum for a great service.

Chris.