summaryrefslogtreecommitdiff
path: root/149/CH4/EX4.21/ques21.sce
blob: e26c9c70fc9177637dffa3b9207c9b1705441a82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//ques21
disp('Taylor series');
disp('f(x+h)=f(x)+hf1(x)+h^2/2!*f2(x)+h^3/3!*f3(x)+......');
disp('To finf the taylor expansion of tan-1(x+h)')
syms x h

  y=atan(x);
  n=input('enter the number of expression in seris : ');
  
t=y;

for i=2:n
  y1=diff(y,'x',i-1);
   t=t+h^(i-1)*(y1)/factorial(i-1);
end
disp(t)