# Trigonometric functions: express sin(x) in terms of tan(x)

1. Sep 13, 2010

### Mentallic

1. The problem statement, all variables and given/known data
I want to express sin(x) in terms of tan(x).

2. Relevant equations
tan(x)=sin(x)/cos(x)
1+tan2(x)=sec2(x)

3. The attempt at a solution
sin(x)=cos(x)tan(x)
At this point I realize this is assuming $x\neq \pi/2+k\pi$

$$cos^2(x)=\frac{1}{1+tan^2(x)}$$

therefore, $$sin(x)=\frac{tan(x)}{\sqrt{1+tan^2(x)}}$$

But I graphed this and it only looks right half of the time. What I should have is the plus or minus when taking the root of cos2(x) but I need the plus half the time, and the minus the other half of the time and then merge them to describe sin(x) in terms of tan(x).

How should I go about this problem and realize what must be done without the use of graphing tools.

2. Sep 13, 2010

### LCKurtz

Re: Functions

Of course you have pinpointed the problem, that being the necessity to have the appropriate sign on the square root. If you multiply your expression by sgn(cos(x)), all will be well except that you may object to having that cosine in your formula. I don't think there is any way to express the sign just in terms of the tangent function because the tangent function has two periods for one for the cosine and sine. You might be able to concoct a formula using greatest integer and mod functions to make a square wave to multiply it by that doesn't involve the cosine, but that is even less satisfactory.

3. Sep 13, 2010

### Bohrok

4. Sep 13, 2010

### Mentallic

Re: Functions

I'd probably have the most luck concocting a piecewise formula for this case since that is what I have experience in doing. By the way, what is sgn?

The formula there gives $$sin(x)=\pm\frac{tanx}{1+tan^2x}$$ so by being as brief as possible, this is the best that could be done. They don't mention for what domain it is plus and where is it minus.

5. Sep 14, 2010

### LCKurtz

Re: Functions

sgn is sometimes used as an abbreviation of the signum or "sign" function.

sgn(x) = 1 if x > 0 and -1 if x < 0

That's why sgn(cos(x)) multiplies your answer by the appropriate choice of + or -.

See http://en.wikipedia.org/wiki/Sign_function