Hi,
I know that I can perform series expansion of the function let say sin(x) by writing a following script commands:
syms x aF = a*sin(x)taylor(F,x,6);
The output is a nice series expansion of sin(x) up to 5th term. However, when I have a number such as F=1 , the taylor gives the error message and fails to give a correct answer which is 1. Is there a way to work around it? Is there a way to verify if F contains variable x or not so that taylor can be avoided when F does not have x variable. Thanks.
Best Answer