Rational trig identities?

10102021, 09:25 PM
(This post was last modified: 10122021 04:26 PM by Albert Chan.)
Post: #4




RE: Rational trig identities?
A simple numeric version, adding angle x, 1 at a time
CAS> addx(n) := x > (1+n*x)/(nx) CAS> a(n) := (addx(n) @@ n) (0) CAS> a(8) → 14970816/9722113 Although code is dumb, this is much faster than expanding tan(n*x) version. For huge n, we can make this faster with code similar to Exponentiation by squaring For n = 8 = 2^3 CAS> doublex(x) := 2x/(1x*x) CAS> (doublex @@ 3) (1/8) → 14970816/9722113 = a(8) For n = 10 = 2*(2^2 + 1) CAS> (doublex @@ 2)(1/10) → 3960/9401 CAS> addx(10)(Ans) → 49001/90050 CAS> doublex(Ans) → 8825080100/5707904499 = a(10) 

« Next Oldest  Next Newest »

Messages In This Thread 
Rational trig identities?  John Keith  10102021, 04:42 PM
RE: Rational trig identities?  Albert Chan  10102021, 06:21 PM
RE: Rational trig identities?  Albert Chan  10102021, 08:02 PM
RE: Rational trig identities?  Albert Chan  10122021, 04:05 PM
RE: Rational trig identities?  Albert Chan  10102021 09:25 PM
RE: Rational trig identities?  John Keith  10112021, 01:08 PM
RE: Rational trig identities?  Albert Chan  10122021, 02:09 PM

User(s) browsing this thread: 1 Guest(s)