I'd like to know how to plot power series (whose variable is x), but I don't even know where to start with.
I know it might not be possible plot infinite series, but it'd do as well plotting the sum of the first n terms.
Plot power series gnuplot
functiongnuplotpower-series
Best Solution
Gnuplot has a
sum
function, which can be used inside theusing
statement to sum up several columns or terms. Together with the special file name+
you can implement power series.Consider the exponention function, which has a power series
So, we define a term as
Now we can plot the power series up to the n=5 term with
To plot the results when using 2 to 7 terms and compare it with the actual exp function, use