I need you to help me in writting procedure with input "r" ( order of derivative) and some coefficients seq(alpha[i],i=1..N). My code work very well, need only put all the element in procedure with output The Taylor series obtained in last line of my code and the order of error. I want the procedure return the coefficients beta used in the series and the order of Error and the coefficients beta[i]
I will not modify my previous question: only I add this remark. I tried to write these lines of procedure.
I need only to add( if the procedure is true) these lines in my procedure. These lines gives the degree of error computed in the code, but when I put these lines in the codes, there is an error. Thanks for your help.
Degree := degree(Error,stepsize);
if (showorder) then:
print(cat(`This stencil is of order `,Degree));
if (showerror) then:
print(cat(`This leading order term in the error is `,Error));
convert(D[r$n](f)(vars) = stencil,diff);