Skip to content

Commit 6d54fb9

Browse files
authored
Create simpson.plt
1 parent 9bbab83 commit 6d54fb9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

simpson.plt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
set title "Simpson Approximation of Integral"
2+
set xrange [0:pi/2]
3+
set yrange [0:1]
4+
5+
f(x) = 5/(exp(pi)-2)*exp(2*x)*cos(x)
6+
p(a,x)= a*(x-0.72)**2 + f(pi/4)
7+
8+
set arrow 1 from pi/4,0.001 to pi/4,f(pi/4) nohead lt 3
9+
10+
plot f(x), p(-1.1,x) title "p(x)", 1 title "m"

0 commit comments

Comments
 (0)