#closed form maclaurin series for f(x)=tanx using sum notation
56 messages · Page 1 of 1 (latest)
here are the derivatives of tangent up to the 7th
I see a pattern with the powers of secants and the tangents appearing
you alternate between increasing the powers of secant by 2 as well as adding a sec^2 term and multiplying by tangent
the coefficients for the sec^2 is obvious - they're being multiplied by 2 every time
the leading coefficient is also pretty easy - its increasing by the factorial function, so multiply by 2 then 3 then 4, etc
but the middle coefficients I don't see a pattern - like how did -120 go to -480 go to +2016?
and yes I checked on desmos, the derivatives are correct
the power series for tan is notoriously whacky
There is a closed form for the coefficients of the Maclaurin series, but it's complicated.
If you want to compute them more efficiently (by hand at least) than by computing derivatives, you can use the fact that tan(x) = sin(x) / cos(x) and divide those power series to deduce the coefficients.
any closed form is good
doesn't matter how complicated
it can't possibly be more complicated than dividing infinite series for sin and cos
I just mean that it's more algorithmic that way.
In any case it looks like this :
what is B_(2n)
Bernoulli numbers
I suppose in some sense it's not really a closed form. From what I remember they're related to the expansion of $\frac{x}{e^x-1}$. And in any case the computation of the numbers themselves would probably be as time consuming by hand as the usual method, although a computer could probably spit them out.
Azyrashacorki
There is this explicit formula for it
complex numbers?
or is i just an index
is this what it's suppose to look like, the bernoulli function?
i used x for n, n for k, and k for i
@blissful scroll
It looks like this, but Desmos is trying to link the dots.
oh hold on
what about this
i used the round function so that any x will be rounded to the nearest integer
Have a = [0...100] and plot the dots directly as (a, f(a)) if you want actual points.
But yes I suppose it should look like this,,.
steps are as good as points
when i plug x=5 it outputs 1.13*10^-13
is that suppose to be 0?
sometimes desmos does that - when it's 0 it'll output a very small number
Yes. That's an artifact of floating point arithmetic.
im afraid i'll break desmos if I try to plug the entire formula in lol
It looks fairly close around x=0
Also Desmos is not particularly good at computing, and you're asking it to do a lot of computation
In SageMath you get a nicer picture of what's going on.
A simple, embeddable interface for SageMath
it should converge for the entire function from -pi/2 to pi/2
ok so it actually works until N=7
at N=8 someting happens and it's no longer as close to the actual tanx
then at N=9 is where it just veers off into the opposite direction after around x=1/2 like in the image I showed
Those are the ones up to n=5.
Again Desmos doesn't do a good job at rendering it.
It should but there is a limit to the computation power of Desmos, as it's trying to render stuff in realtime and you're asking it to make quite intensive computation. At some point it gives up.
Here is for the first 30 approximations