Using Maple 2018 to find coefficients in a power series

174 Views Asked by At

I'm doing a practical experiement and have measured the voltage over a capacitor on an oscilloscope as the capacitor decays. I have a table of results showing the voltage and time, and created an exponential fit and a plot, using

withStatistics
entering the x,y co ordinates
ExponentialFit(X, Y, v)

This calculates $Ae^x$ but I would like to get the first four coefficients of the power series for my measured value of $e^x$.

Any help on how to do this would be much appreciated!

1

There are 1 best solutions below

0
On

So, if I understand, you've found a numeric value for A that makes A*exp(x) fit the data.

If so, then is there a problem with substituting the parameter value into the power series for A*exp(x)?

raw := convert(series(A*exp(x), x, 4), polynom):

lprint(raw);
   A+A*x+(1/2)*A*x^2+(1/6)*A*x^3

eval(raw, A=2.134); # or what have you

                                        2                 3
         2.134 + 2.134 x + 1.067000000 x  + 0.3556666667 x 

Or, if you already have an expression with the numeric value,

expr := 2.134*exp(x):

raw := convert(series(expr, x, 4), polynom):

lprint(raw);
   2.134+2.134*x+1.067000000*x^2+.3556666667*x^3

Of course, for this example that is just A multiplied by the series for exp(x).