summaryrefslogtreecommitdiff
path: root/1332/CH13/EX13.1/13_1.sce
blob: e7e8a0f1f25eab2602d98d87a6751ba884b23bdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//Example 13.1
//Differentiation
//Page no. 420
clc;close;clear;

deff('y=f(x)','y=x^2+5')
deff('y=f1(x,h)','y=(f(x+h)-f(x))/h')
h=0.01;x=2.4
d=f1(x,h)
d1=(f1(x+h,h)-f1(x))/h
printf('dy\n -- = %g\n dx',d)
printf('\n\n\n d2y\n --- = %g\n dx2',d1)