#Tikz, Pgf and Graphing

1 messages · Page 1 of 1 (latest)

regal light
#

Ok so, I have this code with function e^x and the Taylor series that should technically approximate it but during graphing it, there is a bit of space between e^x and Taylor series graph even tho it shouldn't be that way, why ?

#

\begin{tikzpicture}
\begin{axis}[axis lines = left, xlabel = $x$, ylabel = $y$]
\addplot[color=red,samples=1000]{exp(x)};
\addplot[color=blue!10,samples=1000]{1+x/1};
\addplot[color=blue!20,samples=1000]{1+x/1 + (x^2)/2};
\addplot[color=blue!30,samples=1000]{x/1 + (x^2)/2 + (x^3)/6};
\addplot[color=blue!40,samples=1000]{x/1 + (x^2)/2 + (x^3)/6 + (x^4)/24};
\addplot[color=blue!50,samples=1000]{x/1 + (x^2)/2 + (x^3)/6 + (x^4)/24+(x^5)/120};
\addplot[color=blue!60,samples=1000]{x/1 + (x^2)/2 + (x^3)/6 + (x^4)/24+(x^5)/120+(x^6)/720};
\addplot[color=blue!70, samples=1000]{x/1 + (x^2)/2 + (x^3)/6 + (x^4)/24+(x^5)/120+(x^6)/720+(x^7)/5040};
\addplot[color=blue!80,samples=1000]{x/1 + (x^2)/2 + (x^3)/6 + (x^4)/24+(x^5)/120+(x^6)/720+(x^7)/5040+(x^8)/40320};
\end{axis}
\end{tikzpicture}

#

This is my code ^

#

At 0 and around it, look at the small difference in red graph and blue graph

tardy zealotBOT
regal light
#

Oh wait

#

I got it

#

Thanks everyone

#

\begin{tikzpicture}
\begin{axis}[axis lines = left, xlabel = $x$, ylabel = $y$]
\addplot[color=red,samples=1000]{exp(x)};
\addplot[color=blue!10,samples=1000]{1+x/1};
\addplot[color=blue!20,samples=1000]{1+x/1 + (x^2)/2};
\addplot[color=blue!30,samples=1000]{1+x/1 + (x^2)/2 + (x^3)/6};
\addplot[color=blue!40,samples=1000]{1+x/1 + (x^2)/2 + (x^3)/6 + (x^4)/24};
\addplot[color=blue!50,samples=1000]{1+x/1 + (x^2)/2 + (x^3)/6 + (x^4)/24+(x^5)/120};
\addplot[color=blue!60,samples=1000]{1+x/1 + (x^2)/2 + (x^3)/6 + (x^4)/24+(x^5)/120+(x^6)/720};
\addplot[color=blue!70, samples=1000]{1+x/1 + (x^2)/2 + (x^3)/6 + (x^4)/24+(x^5)/120+(x^6)/720+(x^7)/5040};
\addplot[color=blue!80,samples=1000]{1+x/1 + (x^2)/2 + (x^3)/6 + (x^4)/24+(x^5)/120+(x^6)/720+(x^7)/5040+(x^8)/40320};
\end{axis}
\end{tikzpicture}

#

This code works actually

tardy zealotBOT
regal light
#

Ok so

#

How do I end this chat thing ?

restive lily
regal light
restive lily
regal light
# restive lily Three dots at the top?

There's a button to out of this thread or there is a members list on top
And below it is react to post and following followed by a button to get link 🤔

restive lily
#

You don't see this?

regal light