Skip to content

Commit

Permalink
Create simpson.plt
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben1980 committed Apr 15, 2019
1 parent 9bbab83 commit 6d54fb9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions simpson.plt
@@ -0,0 +1,10 @@
set title "Simpson Approximation of Integral"
set xrange [0:pi/2]
set yrange [0:1]

f(x) = 5/(exp(pi)-2)*exp(2*x)*cos(x)
p(a,x)= a*(x-0.72)**2 + f(pi/4)

set arrow 1 from pi/4,0.001 to pi/4,f(pi/4) nohead lt 3

plot f(x), p(-1.1,x) title "p(x)", 1 title "m"

0 comments on commit 6d54fb9

Please sign in to comment.