Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Since it's homework, some hints :

  • $\tan\left(a + b\right) = \displaystyle\frac{\tan\left(a\right) + \tan\left(b\right)}{1-\tan\left(a\right) \tan\left(b\right) }$ is a rational expression in $\tan(a),\,\tan(b)$.

  • This is true for $b=(m-1)a,~m\in\mathbb{N}$. By recurrence, $\tan(ma)$ is a rational expression in $\tan(a)$. For details, see wikipedia, the French version has formulas more easily transcriptible in Sage...).

  • in $\mathbb{C}$, $\tan(\arctan(x))=x$ (but the reverse is no true !).

But those rational expressions are fractions, which have a meaning in the usual fields, not in a "generic ring" where division may not even be defined.

FWIW, Sage win't give you a closed-form for $\tan(mx)$ (gut you can program the expressions given by Wikipedia). However, for defined values of $m$ and $n$, it willgive you the rational expression sought. Example:

sage: tan(5*arctan(x)+6*arctan(y))==tan(5*arctan(x)+6*arctan(y)).trig_expand().tr
....: ig_expand()
tan(5*arctan(x) + 6*arctan(y)) == -(2*(3*y^5 - 10*y^3 + 3*y)/(y^6 - 15*y^4 + 15*y^2 - 1) - (x^5 - 10*x^3 + 5*x)/(5*x^4 - 10*x^2 + 1))/(2*(x^5 - 10*x^3 + 5*x)*(3*y^5 - 10*y^3 + 3*y)/((y^6 - 15*y^4 + 15*y^2 - 1)*(5*x^4 - 10*x^2 + 1)) + 1)

$$\tan\left(5 \, \arctan\left(x\right) + 6 \, \arctan\left(y\right)\right) = \frac{x^{5} y^{6} - 15 \, x^{5} y^{4} - 30 \, x^{4} y^{5} - 10 \, x^{3} y^{6} + 15 \, x^{5} y^{2} + 100 \, x^{4} y^{3} + 150 \, x^{3} y^{4} + 60 \, x^{2} y^{5} + 5 \, x y^{6} - x^{5} - 30 \, x^{4} y - 150 \, x^{3} y^{2} - 200 \, x^{2} y^{3} - 75 \, x y^{4} - 6 \, y^{5} + 10 \, x^{3} + 60 \, x^{2} y + 75 \, x y^{2} + 20 \, y^{3} - 5 \, x - 6 \, y}{6 \, x^{5} y^{5} + 5 \, x^{4} y^{6} - 20 \, x^{5} y^{3} - 75 \, x^{4} y^{4} - 60 \, x^{3} y^{5} - 10 \, x^{2} y^{6} + 6 \, x^{5} y + 75 \, x^{4} y^{2} + 200 \, x^{3} y^{3} + 150 \, x^{2} y^{4} + 30 \, x y^{5} + y^{6} - 5 \, x^{4} - 60 \, x^{3} y - 150 \, x^{2} y^{2} - 100 \, x y^{3} - 15 \, y^{4} + 10 \, x^{2} + 30 \, x y + 15 \, y^{2} - 1}$$

Since it's homework, some hints :

  • $\tan\left(a + b\right) = \displaystyle\frac{\tan\left(a\right) + \tan\left(b\right)}{1-\tan\left(a\right) \tan\left(b\right) }$ is a rational expression in $\tan(a),\,\tan(b)$.

  • This is true for $b=(m-1)a,~m\in\mathbb{N}$. By recurrence, $\tan(ma)$ is a rational expression in $\tan(a)$. For details, see wikipedia, the French version has formulas more easily transcriptible in Sage...).

  • in $\mathbb{C}$, $\tan(\arctan(x))=x$ (but the reverse is no true !).

But those rational expressions are fractions, which have a meaning in the usual fields, not in a "generic ring" where division may not even be defined.

FWIW, Sage win't won't give you a closed-form for $\tan(mx)$ (gut (but you can program the expressions given by Wikipedia). However, for defined values of $m$ and $n$, it will give you the rational expression sought. Example:

sage: tan(5*arctan(x)+6*arctan(y))==tan(5*arctan(x)+6*arctan(y)).trig_expand().tr
....: ig_expand()
x, y = SR.var('x, y')
sage: a = tan(5*arctan(x) + 6*arctan(y))
sage: b = a.trig_expand().trig_expand()
sage: eq = a == b

sage: eq
tan(5*arctan(x) + 6*arctan(y)) == -(2*(3*y^5 - 10*y^3 + 3*y)/(y^6 - 15*y^4 + 15*y^2 - 1) - (x^5 - 10*x^3 + 5*x)/(5*x^4 - 10*x^2 + 1))/(2*(x^5 - 10*x^3 + 5*x)*(3*y^5 - 10*y^3 + 3*y)/((y^6 - 15*y^4 + 15*y^2 - 1)*(5*x^4 - 10*x^2 + 1)) + 1)

sage: eq.factor()
tan(5*arctan(x) + 6*arctan(y)) == (x^5*y^6 - 15*x^5*y^4 - 30*x^4*y^5 - 10*x^3*y^6 + 15*x^5*y^2 + 100*x^4*y^3 + 150*x^3*y^4 + 60*x^2*y^5 + 5*x*y^6 - x^5 - 30*x^4*y - 150*x^3*y^2 - 200*x^2*y^3 - 75*x*y^4 - 6*y^5 + 10*x^3 + 60*x^2*y + 75*x*y^2 + 20*y^3 - 5*x - 6*y)/(6*x^5*y^5 + 5*x^4*y^6 - 20*x^5*y^3 - 75*x^4*y^4 - 60*x^3*y^5 - 10*x^2*y^6 + 6*x^5*y + 75*x^4*y^2 + 200*x^3*y^3 + 150*x^2*y^4 + 30*x*y^5 + y^6 - 5*x^4 - 60*x^3*y - 150*x^2*y^2 - 100*x*y^3 - 15*y^4 + 10*x^2 + 30*x*y + 15*y^2 - 1)

$$\tan\left(5 Using

sage: latex(eq)
sage: latex(eqq)

we get

$$ \tan\left(5 \, \arctan\left(x\right) + 6 \, \arctan\left(y\right)\right) = -\frac{\frac{2 \, {\left(3 \, y^{5} - 10 \, y^{3} + 3 \, y\right)}}{y^{6} - 15 \, y^{4} + 15 \, y^{2} - 1} - \frac{x^{5} - 10 \, x^{3} + 5 \, x}{5 \, x^{4} - 10 \, x^{2} + 1}}{\frac{2 \, {\left(x^{5} - 10 \, x^{3} + 5 \, x\right)} {\left(3 \, y^{5} - 10 \, y^{3} + 3 \, y\right)}}{{\left(y^{6} - 15 \, y^{4} + 15 \, y^{2} - 1\right)} {\left(5 \, x^{4} - 10 \, x^{2} + 1\right)}} + 1} $$

and

$$ \tan\left(5 \, \arctan\left(x\right) + 6 \, \arctan\left(y\right)\right) = \frac{x^{5} y^{6} - 15 \, x^{5} y^{4} - 30 \, x^{4} y^{5} - 10 \, x^{3} y^{6} + 15 \, x^{5} y^{2} + 100 \, x^{4} y^{3} + 150 \, x^{3} y^{4} + 60 \, x^{2} y^{5} + 5 \, x y^{6} - x^{5} - 30 \, x^{4} y - 150 \, x^{3} y^{2} - 200 \, x^{2} y^{3} - 75 \, x y^{4} - 6 \, y^{5} + 10 \, x^{3} + 60 \, x^{2} y + 75 \, x y^{2} + 20 \, y^{3} - 5 \, x - 6 \, y}{6 \, x^{5} y^{5} + 5 \, x^{4} y^{6} - 20 \, x^{5} y^{3} - 75 \, x^{4} y^{4} - 60 \, x^{3} y^{5} - 10 \, x^{2} y^{6} + 6 \, x^{5} y + 75 \, x^{4} y^{2} + 200 \, x^{3} y^{3} + 150 \, x^{2} y^{4} + 30 \, x y^{5} + y^{6} - 5 \, x^{4} - 60 \, x^{3} y - 150 \, x^{2} y^{2} - 100 \, x y^{3} - 15 \, y^{4} + 10 \, x^{2} + 30 \, x y + 15 \, y^{2} - 1}$$

1} $$

Since it's homework, some hints :

  • $\tan\left(a + b\right) = \displaystyle\frac{\tan\left(a\right) + \tan\left(b\right)}{1-\tan\left(a\right) \tan\left(b\right) }$ is a rational expression in $\tan(a),\,\tan(b)$.

  • This is true for $b=(m-1)a,~m\in\mathbb{N}$. By recurrence, $\tan(ma)$ is a rational expression in $\tan(a)$. For details, see wikipedia, the French version has formulas more easily transcriptible in Sage...).

  • in $\mathbb{C}$, $\tan(\arctan(x))=x$ (but the reverse is no true !).

But those rational expressions are fractions, which have a meaning in the usual fields, not in a "generic ring" where division may not even be defined.

FWIW, Sage won't give you a closed-form for $\tan(mx)$ (but you can program the expressions given by Wikipedia). However, for defined values of $m$ and $n$, it will give you the rational expression sought. Example:

sage: x, y = SR.var('x, y')
sage: a = tan(5*arctan(x) + 6*arctan(y))
sage: b = a.trig_expand().trig_expand()
sage: eq = a == b

sage: eq
tan(5*arctan(x) + 6*arctan(y)) == -(2*(3*y^5 - 10*y^3 + 3*y)/(y^6 - 15*y^4 + 15*y^2 - 1) - (x^5 - 10*x^3 + 5*x)/(5*x^4 - 10*x^2 + 1))/(2*(x^5 - 10*x^3 + 5*x)*(3*y^5 - 10*y^3 + 3*y)/((y^6 - 15*y^4 + 15*y^2 - 1)*(5*x^4 - 10*x^2 + 1)) + 1)

sage: eqq = eq.factor()
sage: eqq
tan(5*arctan(x) + 6*arctan(y)) == (x^5*y^6 - 15*x^5*y^4 - 30*x^4*y^5 - 10*x^3*y^6 + 15*x^5*y^2 + 100*x^4*y^3 + 150*x^3*y^4 + 60*x^2*y^5 + 5*x*y^6 - x^5 - 30*x^4*y - 150*x^3*y^2 - 200*x^2*y^3 - 75*x*y^4 - 6*y^5 + 10*x^3 + 60*x^2*y + 75*x*y^2 + 20*y^3 - 5*x - 6*y)/(6*x^5*y^5 + 5*x^4*y^6 - 20*x^5*y^3 - 75*x^4*y^4 - 60*x^3*y^5 - 10*x^2*y^6 + 6*x^5*y + 75*x^4*y^2 + 200*x^3*y^3 + 150*x^2*y^4 + 30*x*y^5 + y^6 - 5*x^4 - 60*x^3*y - 150*x^2*y^2 - 100*x*y^3 - 15*y^4 + 10*x^2 + 30*x*y + 15*y^2 - 1)

Using

sage: latex(eq)
sage: latex(eqq)

we get

$$ \tan\left(5 \, \arctan\left(x\right) + 6 \, \arctan\left(y\right)\right) = -\frac{\frac{2 \, {\left(3 \, y^{5} - 10 \, y^{3} + 3 \, y\right)}}{y^{6} - 15 \, y^{4} + 15 \, y^{2} - 1} - \frac{x^{5} - 10 \, x^{3} + 5 \, x}{5 \, x^{4} - 10 \, x^{2} + 1}}{\frac{2 \, {\left(x^{5} - 10 \, x^{3} + 5 \, x\right)} {\left(3 \, y^{5} - 10 \, y^{3} + 3 \, y\right)}}{{\left(y^{6} - 15 \, y^{4} + 15 \, y^{2} - 1\right)} {\left(5 \, x^{4} - 10 \, x^{2} + 1\right)}} + 1} $$

and

$$ \tan\left(5 \, \arctan\left(x\right) + 6 \, \arctan\left(y\right)\right) = \frac{x^{5} y^{6} - 15 \, x^{5} y^{4} - 30 \, x^{4} y^{5} - 10 \, x^{3} y^{6} + 15 \, x^{5} y^{2} + 100 \, x^{4} y^{3} + 150 \, x^{3} y^{4} + 60 \, x^{2} y^{5} + 5 \, x y^{6} - x^{5} - 30 \, x^{4} y - 150 \, x^{3} y^{2} - 200 \, x^{2} y^{3} - 75 \, x y^{4} - 6 \, y^{5} + 10 \, x^{3} + 60 \, x^{2} y + 75 \, x y^{2} + 20 \, y^{3} - 5 \, x - 6 \, y}{6 \, x^{5} y^{5} + 5 \, x^{4} y^{6} - 20 \, x^{5} y^{3} - 75 \, x^{4} y^{4} - 60 \, x^{3} y^{5} - 10 \, x^{2} y^{6} + 6 \, x^{5} y + 75 \, x^{4} y^{2} + 200 \, x^{3} y^{3} + 150 \, x^{2} y^{4} + 30 \, x y^{5} + y^{6} - 5 \, x^{4} - 60 \, x^{3} y - 150 \, x^{2} y^{2} - 100 \, x y^{3} - 15 \, y^{4} + 10 \, x^{2} + 30 \, x y + 15 \, y^{2} - 1} $$

Since it's homework, some hints :

  • $\tan\left(a + b\right) = \displaystyle\frac{\tan\left(a\right) + \tan\left(b\right)}{1-\tan\left(a\right) \tan\left(b\right) }$ is a rational expression in $\tan(a),\,\tan(b)$.

  • This is true for $b=(m-1)a,~m\in\mathbb{N}$. By recurrence, $\tan(ma)$ is a rational expression in $\tan(a)$. For details, see wikipedia, the French version has formulas more easily transcriptible in Sage...).

  • in $\mathbb{C}$, $\tan(\arctan(x))=x$ (but the reverse is no true !).

But those rational expressions are fractions, which have a meaning in the usual fields, not in a "generic ring" where division may not even be defined.

FWIW, Sage won't give you a closed-form for $\tan(mx)$ (but you can program the expressions given by Wikipedia). However, for defined values of $m$ and $n$, it will give you the rational expression sought. Example:

sage: x, y = SR.var('x, y')
sage: a = tan(5*arctan(x) + 6*arctan(y))
sage: b = a.trig_expand().trig_expand()
sage: eq = a == b

sage: eq
tan(5*arctan(x) + 6*arctan(y)) == -(2*(3*y^5 - 10*y^3 + 3*y)/(y^6 - 15*y^4 + 15*y^2 - 1) - (x^5 - 10*x^3 + 5*x)/(5*x^4 - 10*x^2 + 1))/(2*(x^5 - 10*x^3 + 5*x)*(3*y^5 - 10*y^3 + 3*y)/((y^6 - 15*y^4 + 15*y^2 - 1)*(5*x^4 - 10*x^2 + 1)) + 1)

sage: eqq = eq.factor()
sage: eqq
tan(5*arctan(x) + 6*arctan(y)) == (x^5*y^6 - 15*x^5*y^4 - 30*x^4*y^5 - 10*x^3*y^6 + 15*x^5*y^2 + 100*x^4*y^3 + 150*x^3*y^4 + 60*x^2*y^5 + 5*x*y^6 - x^5 - 30*x^4*y - 150*x^3*y^2 - 200*x^2*y^3 - 75*x*y^4 - 6*y^5 + 10*x^3 + 60*x^2*y + 75*x*y^2 + 20*y^3 - 5*x - 6*y)/(6*x^5*y^5 + 5*x^4*y^6 - 20*x^5*y^3 - 75*x^4*y^4 - 60*x^3*y^5 - 10*x^2*y^6 + 6*x^5*y + 75*x^4*y^2 + 200*x^3*y^3 + 150*x^2*y^4 + 30*x*y^5 + y^6 - 5*x^4 - 60*x^3*y - 150*x^2*y^2 - 100*x*y^3 - 15*y^4 + 10*x^2 + 30*x*y + 15*y^2 - 1)

Using

From there, using sage: latex(eq)
sage: latex(eqq)
latex(eq)

and latex(eqq) or view(eq) and view(eqq) we get

$$ \tan\left(5 \, \arctan\left(x\right) + 6 \, \arctan\left(y\right)\right) = -\frac{\frac{2 \, {\left(3 \, y^{5} - 10 \, y^{3} + 3 \, y\right)}}{y^{6} - 15 \, y^{4} + 15 \, y^{2} - 1} - \frac{x^{5} - 10 \, x^{3} + 5 \, x}{5 \, x^{4} - 10 \, x^{2} + 1}}{\frac{2 \, {\left(x^{5} - 10 \, x^{3} + 5 \, x\right)} {\left(3 \, y^{5} - 10 \, y^{3} + 3 \, y\right)}}{{\left(y^{6} - 15 \, y^{4} + 15 \, y^{2} - 1\right)} {\left(5 \, x^{4} - 10 \, x^{2} + 1\right)}} + 1} $$

and

$$ \tan\left(5 \, \arctan\left(x\right) + 6 \, \arctan\left(y\right)\right) = \frac{x^{5} y^{6} - 15 \, x^{5} y^{4} - 30 \, x^{4} y^{5} - 10 \, x^{3} y^{6} + 15 \, x^{5} y^{2} + 100 \, x^{4} y^{3} + 150 \, x^{3} y^{4} + 60 \, x^{2} y^{5} + 5 \, x y^{6} - x^{5} - 30 \, x^{4} y - 150 \, x^{3} y^{2} - 200 \, x^{2} y^{3} - 75 \, x y^{4} - 6 \, y^{5} + 10 \, x^{3} + 60 \, x^{2} y + 75 \, x y^{2} + 20 \, y^{3} - 5 \, x - 6 \, y}{6 \, x^{5} y^{5} + 5 \, x^{4} y^{6} - 20 \, x^{5} y^{3} - 75 \, x^{4} y^{4} - 60 \, x^{3} y^{5} - 10 \, x^{2} y^{6} + 6 \, x^{5} y + 75 \, x^{4} y^{2} + 200 \, x^{3} y^{3} + 150 \, x^{2} y^{4} + 30 \, x y^{5} + y^{6} - 5 \, x^{4} - 60 \, x^{3} y - 150 \, x^{2} y^{2} - 100 \, x y^{3} - 15 \, y^{4} + 10 \, x^{2} + 30 \, x y + 15 \, y^{2} - 1} $$