Arithmetic series General (kth) term, last (nth) term, l = Sum to n terms,
W
or
uk = a + (k – 1)d un = a + (n – l)d Sn = 1–2 n(a + l) = 1–2 n[2a + (n – 1)d]
Geometric series General (kth) term, Sum to n terms, Sum to infinity
ld
uk = a r k–1 a(1 – r n) a(r n – 1) Sn = –––––––– = –––––––– 1–r r–1
Of
()
M
()
at
() ( ) (
2
h) e m
(x – a)2 (x – a)rf(r)(a) = f(a) + (x – a)f'(a) + –––––– f"(a) + ... + –––––––––– + ... r! 2!
f(a + x)
x2 xr = f(a) + xf'(a) + –– f"(a) + ... + –– f(r)(a) + ... 2! r!
ln(1 + x)
x2 x3 xr = x – –– + –– – ... + (–1)r+1 –– + ... , – 1 < x < 1 2 3 r
sin x
x3 x5 x 2r+1 = x – –– + –– – ... + (–1)r –––––––– + ... , all x 3! 5! (2r + 1)!
cos x
x2 x4 x 2r = 1 – –– + –– – ... + (–1)r –––– + ... , all x 2! 4! (2r)!
arctan x
x3 x5 x 2r+1 = x – –– + –– – ... + (–1)r –––––– + ... , – 1 < x < 1 3 5 2r + 1
at
sinh x
General case n(n – 1) 2 n(n – 1) ... (n – r + 1) ––––––––––––––––– xr + ... , |x| < 1, (1 + x)n = 1 + nx + ––––––– x + ... + 2! 1.2 ... r n∈R Logarithms and exponentials exln a = ax
f(x)
logbx loga x = ––––– logba
Numerical solution of equations f(xn) Newton-Raphson iterative formula for solving f(x) = 0, xn+1 = xn – –––– f'(xn) Complex Numbers {r(cos θ + j sin θ)}n = r n(cos nθ + j sin nθ) ejθ = cos θ + j sin θ 2πk j) for k = 0, 1, 2, ..., n – 1 The roots of zn = 1 are given by z = exp( –––– n Finite series n n 1 1 ∑ r2 = – n(n + 1)(2n + 1) ∑ r3 = – n2(n + 1)2 4 6 r=1 r=1
ics
ALGEBRA
n n n (a + b)n = an + 1 an – 1 b + 2 an –2 b2 + ... + r an–r br + ... bn , n ∈ N where n n n n+1 n! n + r+1 = r+1 r = Cr = –––––––– r r!(n – r)!
()
x2 xr = f(0) + xf'(0) + –– f"(0) + ... + –– f (r)(0) + ... 2! r!
x2 xr ex = exp(x) = 1 + x + –– + ... + –– + ... , all x 2! r!
a ,–1
Binomial expansions When n is a positive integer
()
Infinite series f(x)
x3 x5 x 2r+1 = x + –– + –– + ... + –––––––– + ... , all x 3! 5! (2r + 1)!
cosh x
x2 x4 x 2r = 1 + –– + –– + ... + –––– + ... , all x 2! 4! (2r)!
artanh x
x3 x5 x 2r+1 = x + –– + –– + ... + –––––––– + ... , – 1 < x < 1 3 5 (2r + 1)
&
Hyperbolic functions
St
at
cosh2x – sinh2x = 1, sinh2x = 2sinhx coshx, cosh2x = cosh2x + sinh2x arcosh x = ln(x + x 2 + 1 ), 1 + x 1 artanh x = –2 ln ––––– 1 – x , |x| < 1
arsinh x = ln(x +
(
)
ist ics(
Matrices Anticlockwise rotation through angle θ, centre O: Reflection in the line y = x tan θ :
x 2 – 1 ), x > 1
cos θ sin θ
2θ ( cos sin 2θ
–sin θ cos θ
)
sin 2θ –cos 2θ
)
Cosine rule
A
b2 + c2 – a2 (etc.) cos A = ––––––––––
W
2bc
c
a2 = b2 + c2 –2bc cos A (etc.)
Trigonometry
B
or
Perpendicular distance of a point from a line and a plane b
a
Line: (x1,y1) from ax + by + c = 0 :
a2 + b2 n1α + n2β + n3γ + d Plane: (α,β,γ) from n1x + n2y + n3z + d = 0 : –––––––––––––––––– √(n12 + n22 + n32)
C
sin (θ ± φ) = sin θ cos φ ± cos θ sin φ
ld
cos (θ ± φ) = cos θ cos φ 7 sin θ sin φ
Vector product
i a1 b1 a2b3 – a3b2 a × b = |a| |b| sinθ ^n = j a2 b2 = a3b1 – a1b3 k a3 b3 a1b2 – a2b1
tan θ ± tan φ tan (θ ± φ) = –––––––––––– , [(θ ± φ) ≠ (k + W)π] 1 7 tan θ tan φ
cos θ + cos φ = 2 cos 1–2 (θ + φ) cos cos θ – cos φ = –2 sin 1–2 (θ + φ) sin
|
M
at
sin θ – sin φ = 2 cos 1–2 (θ + φ) sin 1–2 (θ – φ)
a × (b × c) = (c . a) b – (a . b) c
he m
1– 2 (θ – φ) 1– 2 (θ – φ)
3 Vectors and 3-D coordinate geometry (The position vectors of points A, B, C are a, b, c.)
The position vector of the point dividing AB in the ratio λ:µ µa + λb is ––––––– (λ + µ) Line:
)
a1 b1 c1 a. (b × c) = a2 b2 c2 = b. (c × a) = c. (a × b) a3 b3 c3
(1 + t )
sin θ + sin φ = 2 sin 1–2 (θ + φ) cos 1–2 (θ – φ)
| |( |
Cartesian equation of line through A in direction u is x – a1 y – a2 z – a3 =t = –––––– = –––––– –––––– u1 u2 u3
( )
Conics Ellipse
Parabola
Hyperbola
Rectangular hyperbola
Standard form
y2 x2 + –– –– =1 b2 a2
y2 = 4ax
y2 x2 – –– –– =1 b2 a2
x y = c2
Parametric form
(acosθ, bsinθ)
(at2, 2at)
(asecθ, btanθ)
(ct, –c–) t
e<1 b2 = a2 (1 – e2)
e=1
e>1 b2 = a2 (e2 – 1)
e = √2
(± ae, 0)
(a, 0)
(± ae, 0)
(±c√2, ±c√2)
x = ± –a e
x = –a
x = ± –ae
x + y = ±c√2
none
none
y x a– = ± –b
x = 0, y = 0
at
ics
Eccentricity
Foci
Directrices Asymptotes
&
St
at
a.u The resolved part of a in the direction u is ––––– |u|
Any of these conics can be expressed in polar coordinates (with the focus as the origin) as: where l is the length of the semi-latus rectum.
Plane: Cartesian equation of plane through A with normal n is n1 x + n2y + n3z + d = 0 where d = –a . n
Mensuration
The plane through non-collinear points A, B and C has vector equation r = a + s(b – a) + t(c – a) = (1 – s – t) a + sb + tc The plane through A parallel to u and v has equation r = a + su + tv
Cone :
Sphere : Surface area = 4π r2
l – = 1 + e cos θ r
ist ics
Curved surface area = π r × slant height
TRIGONOMETRY, VECTORS AND GEOMETRY
Of
(1 – t2) 2t , cos θ = –––––– For t = tan 1–2 θ : sin θ = –––––– 2 2 (1 + t )
ax1 + by1 + c
Differentiation f(x) tan kx sec x cot x cosec x arcsin x
W
or
arccos x
ld
arctan x sinh x cosh x tanh x
Of
f'(x) ksec2 kx sec x tan x –cosec2 x –cosec x cot x 1 ––––––– √(1 – x2) –1 ––––––– √(1 – x2) 1 ––––– 1 + x2 cosh x sinh x sech2 x 1 ––––––– √(1 + x2)
Integration f(x) sec2 kx tan x cot x cosec x
M
at
arsinh x
artanh x 4
he m
du dv v ––– – u ––– dx dx u dy Quotient rule y = – , ––– = 2 v v dx b ––– a ∫a ydx ≈ 1–2 h{(y0 + yn) + 2(y1 + y2 + ... + yn –1)}, where h = ––– n b
Integration by parts Area of a sector
Arc length
dv du dx = uv – ∫ v ––– dx ∫ u ––– dx dx A = 1–2 ∫ r dθ (polar coordinates) A = 1–2 ∫ (x˙y – yx˙) dt (parametric form) s = ∫ √ (x˙ + y˙ ) dt (parametric form) dy s = ∫ √ (1 + [ –––] ) dx (cartesian coordinates) dx dr s = ∫ √ (r + [ –––] ) dθ (polar coordinates) dθ 2
2
2
2
2
2
at
ics
Surface area of revolution
Curvature
&
| (
)|
| | x arcsin ( – a ) , |x| < a 1 x – a arctan( – a) 1 1 x a+x –– ln ––––– = – artanh ( – a ) , |x| < a 2a | a – x | a
cosh x sinh x ln cosh x x 2 2 arsinh – a or ln (x + x + a ),
() x arcosh ( – a ) or ln (x + x S = 2π∫y ds = 2π∫y√(x˙ S = 2π∫x ds = 2π∫x√(x˙
2
– a 2 ), x > a , a > 0
2
+ y˙ 2) dt
2
+ y˙ 2) dt
x
y
d2y ––– dψ x˙ ÿ – x¨ y˙ dx2 κ = ––– = –––––––– 3/2 = ––––––––––––– 2 2 ds dy 2 3/2 (˙x + y˙ ) 1 + –– dx
St ( [ ] ) at ist i
1 Radius of curvature ρ = –– κ, L'Hôpital’s rule
Centre of curvature c = r + ρ n^
If f(a) = g(a) = 0 and g'(a) ≠ 0 then
f(x) f'(a) Lim –––– = –––– x ➝a g(x) g'(a)
cs
Multi-variable calculus ∂g/∂x ∂w ∂w ∂w grad g = ∂g/∂y For w = g(x, y, z), δw = ––– δx + ––– δy + ––– δz ∂x ∂y ∂z ∂g/∂z
( )
CALCULUS
1 ––––––– √(x2 – 1) 1 ––––––– (1 – x2)
arcosh x
Trapezium rule
sec x 1 –––––– x2 – a2 1 ––––––– √(a2 – x2) 1 –––––– a2 + x2 1 –––––– a2 – x2 sinh x cosh x tanh x 1 ––––––– √(a2 + x2) 1 ––––––– √(x2 – a2)
∫f(x) dx (+ a constant) (l/k) tan kx ln |sec x| ln |sin x| x –ln |cosec x + cot x| = ln |tan – 2| x π ln |sec x + tan x| = ln tan – + – 2 4 1 x–a –– ln ––– x +–– a 2a
Centre of mass (uniform bodies)
Moments of inertia (uniform bodies, mass M)
W
Triangular lamina: Solid hemisphere of radius r:
or
Hemispherical shell of radius r:
ld
Solid cone or pyramid of height h:
Of
Sector of circle, radius r, angle 2θ:
2 – along median from vertex 3 3 – r from centre 8 1 – r from centre 2 1 – h above the base on the 4
Thin rod, length 2l, about perpendicular axis through centre: Rectangular lamina about axis in plane bisecting edges of length 2l: Thin rod, length 2l, about perpendicular axis through end: Rectangular lamina about edge perpendicular to edges of length 2l:
line from centre of base to vertex
Rectangular lamina, sides 2a and 2b, about perpendicular 1 – M(a2 + b2) axis through centre: 3
2r sin θ ––––––– from centre 3θ
M
Hoop or cylindrical shell of radius r about perpendicular axis through centre:
r sin θ from centre Arc of circle, radius r, angle 2θ at centre: –––––––
θ
at
Hoop of radius r about a diameter:
1 – h above the base on the 3 line from the centre of
Conical shell, height h:
Solid sphere of radius r about a diameter:
5
at
Spherical shell of radius r about a diameter:
Motion in a circle Transverse velocity: v = rθ˙ v2 Radial acceleration: –rθ˙ 2 = – –– r Transverse acceleration: v˙ = rθ¨ General motion Radial velocity: Transverse velocity: Radial acceleration: Transverse acceleration:
Disc of radius r about a diameter:
r˙ rθ˙
r¨ – rθ˙ 2 1 d rθ¨ + 2r˙θ˙ = – –– (r2θ˙) r dt
Moments as vectors The moment about O of F acting at r is r × F
ics
1 – Mr2 2 1 – Mr2 2 1 – Mr2 4 2 – Mr2 5 2 – Mr2 3
IA = IG + M(AG)2
Parallel axes theorem:
&
Mr2
Iz = Ix + Iy (for a lamina in the (x, y) plane)
Perpendicular axes theorem:
St
at
ist ics
MECHANICS
he m
Disc or solid cylinder of radius r about axis:
base to the vertex
Motion in polar coordinates
1 – Ml2 3 1 – Ml2 3 4 – Ml2 3 4 – Ml2 3
Probability
Product-moment correlation: Pearson’s coefficient ∑ xi yi –xy Sxy Σ( xi – x )( yi – y ) n r= = = 2 2 Sxx Syy ∑ xi 2 ∑ yi 2 Σ( xi – x ) Σ( yi – y ) − x2 − y2 n n
P(A∪B) = P(A) + P(B) – P(A∩B) P(A∩B) = P(A) . P(B|A) P(B|A)P(A) P(A|B) = –––––––––––––––––––––– P(B|A)P(A) + P(B|A')P(A')
W
[
or
P(Aj)P(B|Aj) Bayes’ Theorem: P(A j |B) = –––––––––––– ∑P(Ai)P(B|Ai)
ld
Populations Discrete distributions
Of
Rank correlation: Spearman’s coefficient 6∑di2 rs = 1 – –––––––– n(n2 – 1)
X is a random variable taking values xi in a discrete distribution with P(X = xi) = pi Expectation: µ = E(X) = ∑xi pi σ2 = Var(X) = ∑(xi – µ)2 pi = ∑xi2pi – µ2 Variance: For a function g(X): E[g(X)] = ∑g(xi)pi
Regression
M
at
Cumulative x distribution function F(x) = P(X < x) = ∫–∞f(t)dt
n
, Syy = ∑(yi – y )2 = ∑yi2 –
(∑xi)(∑yi) Sxy = ∑(xi – x )(yi – y ) = ∑xi yi – ––––––––– n Covariance
Sxy = ∑( xi – x )( yi – y ) = ∑ xi yi – x y –––– n n n
ics
1 ∑(x – x )2f S2 for population variance σ 2 where S2 = –––– i i n–1
&
Probability generating functions For a discrete distribution
For a sample of n pairs of observations (xi, yi) (∑xi)2 –––––
at
(∑yi)2 ––––– n
,
G(t) = E(tX)
St
at
E(X) = G'(1); Var(X) = G"(1) + µ – µ2
ist ics
GX + Y (t) = GX (t) GY (t) for independent X, Y Moment generating functions: MX(θ) =
E(eθX)
E(X) = M'(0) = µ;
E(Xn) = M(n)(0)
Var(X) = M"(0) – {M'(0)}2
MX + Y (θ) = MX (θ) MY (θ) for independent X, Y
STATISTICS
6
X is a continuous variable with probability density function (p.d.f.) f(x) Expectation: µ = E(X) = ∫ x f(x)dx Variance: σ2 = Var (X) = ∫(x – µ)2 f(x)dx = ∫x2 f(x)dx – µ2 For a function g(X): E[g(X)] = ∫g(x)f(x)dx
Sxx = ∑(xi – x )2 = ∑xi2 –
Least squares regression line of y on x: y – y = b(x – x ) ∑ xi yi –xy Sxy ∑(xi – x) (yi – y ) n = ––––––––––––––– = b = ––– Sxx ∑ xi 2 ∑(xi – x )2 – x2 n Estimates Unbiased estimates from a single sample σ2 X for population mean µ; Var X = –– n
he m
Continuous distributions
Correlation and regression
]
Regression
Markov Chains pn + 1 = pnP Long run proportion p = pP
W
or
Bivariate distributions Covariance Cov(X, Y) = E[(X – µX)(Y – µY)] = E(XY) – µXµY
ld
Cov(X, Y) ρ = –––––––– Product-moment correlation coefficient σX σY Sum and difference Var(aX ± bY) = a2Var(X) + b2Var(Y) ± 2ab Cov (X,Y) If X, Y are independent: Var(aX ± bY) = a2Var(X) + b2Var(Y) E(XY) = E(X) E(Y) Coding X = aX' + b ⇒ Cov(X, Y) = ac Cov(X', Y') Y = cY ' + d
Of
α + βf(xi) + εi α + βxi + γzi + εi
∑(yi – a –
εi ~ N(0, σ2)
Ti2 T 2 SSB = ∑ni ( x i – x )2 = ∑ ––– ni – –– n i i x )2 =
∑ ∑ xij i j
2
2 –– – T n
2 2
czi)2
3
a, b, c are estimates for α, β, γ.
b−β ~ tn – 2 σˆ 2 / Sxx
)
σ 2∑xi2 a = y – b x , a ~ N α, ––––––– nS
(
xx
RSS σ^2 = n–––– –p
)
(x0 – x )2 a + bx0 ~ N(α + βx0, σ2 1 + ––––––– – n Sxx 2 (Sxy) RSS = Syy – ––––– = Syy (1 – r2) Sxx
{
at
}
Randomised response technique
ics
–y – (1 – θ)
n E(p^) = –––––––––– (2θ – 1)
Factorial design
&
[(2θ – 1) p + (1 – θ)][θ – (2θ – 1)p]
Var(p^) = –––––––––––––––––––––––––––––– 2 n(2θ – 1)
St
Interaction between 1st and 2nd of 3 treatments (–)
{
at
(Abc – abc) + (AbC – abC) (ABc – aBc) + (ABC – aBC) ––––––––––––––––––––– – –––––––––––––––––––––– 2 2
Exponential smoothing
ist ics
}
y^n+1 = α yn + α(1 – α)yn–1 + α(1 – α)2 yn–2 + ... + α(1 – α)n–1 y1 + (1 – α)ny0 ^y = y^ + α(y – y^ ) n n n+1 n y^n+1 = α yn + (1 – α) y^n
STATISTICS
7
One-factor model: xij = µ + αi + εij, where εij ~ N(0,σ2)
∑(yi – a – bxi –
(
he m
No. of parameters, p
bf(xi))2
For the model Yi = α + βxi + εi, Sxy σ2 , b = ––– , b ~ N β, ––– Sxx Sxx
M
Analysis of variance
i j
RSS ∑(yi – a – bxi)2
at
}
SST = ∑ ∑ (xij –
Yi α + βxi + εi
W
Description
Pearson’s product moment correlation test
or
ld
∑ xi yi –xy n ∑ xi 2 ∑ yi 2 – x2 – y2 n n
Of
8
x–µ σ/ n
t-test for a mean
x–µ s/ n
t-test for paired sample
Normal test for the difference in the means of 2 samples with different variances
∑
(f
o
– fe )
( x – y ) – ( µ1 – µ2 ) 1 1 + s n1 n2
t-test for the difference in the means of 2 samples
at
N(0, 1)
tn – 1
2
( x1 – x2 ) – µ s/ n
χ 2v
at
Wilcoxon Rank-sum (or Mann-Whitney) 2-Sample test
ics
&
Normal test on binomial proportion t with (n – 1) degrees of freedom
χ2 test for variance
( x – y ) – ( µ1 – µ2 ) N(0, 1)
F-test on ratio of two variances
Distribution
tn
1
+ n2 – 2
(n1 – 1)s12 + (n2 – 1)s22 where s2 = ––––––––––––––––––––––– n1 + n2 – 2
Wilcoxon single sample test
he m
fe
σ 12 σ 2 2 + n1 n2
Test statistic
M
6∑di2 rs = 1 – ––––––– n(n2 – 1)
Normal test for a mean
χ2 test
Description
Distribution
A statistic T is calculated from the ranked data.
See tables
Samples size m, n: m < n Wilcoxon W = sum of ranks of sample size m Mann-Whitney T = W – 1–2 m(m + 1)
See tables
p –θ
St
θ (1 – θ ) n
at
(n – 1)s 2
ist ics
σ2
s12 /σ12 ––––––– s22 /σ22
, s12 > s22
N(0, 1)
χ2n – 1 Fn
1
–1, n2 –1
STATISTICS: HYPOTHESIS TESTS
Spearman rank correlation test
r=
Test statistic
W
or
Variance
p.g.f. G(t) (discrete) m.g.f. M(θ) (continuous)
ld
Binomial B(n, p) Discrete
P(X = r) = nCr qn–rpr , for r = 0, 1, ... ,n , 0 < p < 1, q = 1 – p
np
npq
G(t) = (q + pt)n
Poisson (λ) Discrete
Of
λr P(X = r) = e–λ ––– r! , for r = 0, 1, ... , λ > 0
λ
λ
G(t) = eλ(t – 1)
µ
σ2
M(θ) = exp(µθ + Wσ 2θ 2)
M
at ( ( ) ) he m 1
x–µ exp – W ––––– σ
f(x) =
Uniform (Rectangular) on [a, b] Continuous
1 f(x) = ––––– b–a
Exponential Continuous
f(x) = λe–λx
Geometric Discrete
P(X = r) = q r – 1p ,
9
Normal N(µ, σ2) Continuous
Negative binomial Discrete
σ 2π
2
–∞ < x < ∞
, a
,
0
,
at
x > 0, λ > 0 r = 1, 2, ... ,
, q=1–p
r – 1C n–1
qr – n pn , r = n, n + 1, ... ,
0
q=1–p
ics
a+b ––––– 2
&
1 –– λ
1 –– 12
ebθ – eaθ M(θ) = ––––––––– (b – a)θ
(b – a)2
λ M(θ) = ––––– λ–θ
1 –– λ2
1 –– p
St
n –– p
nq ––2 p
q ––2 p
at
pt G(t) = ––––– 1 – qt
ist ( ) ics pt G(t) = ––––– 1 – qt
n
STATISTICS: DISTRIBUTIONS
Mean
Function
Name
Numerical Solution of Equations
f(xn) The Newton-Raphson iteration for solving f(x) = 0 : xn + 1 = xn – –––– f'(xn) Numerical integration The trapezium rule b 1 b–a ydx ≈ –2 h{(y0 + yn) + 2(y1 + y2 + ... + yn – 1)}, where h = ––––– n a
W
Taylor polynomials h2 f(a + h) = f(a) + hf '(a) + ––– f"(a) + error 2! h2 f(a + h) = f(a) + hf '(a) + ––– f"(a + ξ), 0 < ξ < h 2!
or
∫
ld
The mid-ordinate rule
∫a ydx ≈ h(y b
1 – 2
1– 3 h{(y0
M
at
+ yn) + 4(y1 + y3 + ... + yn – 1) + 2(y2 + y4 + ... + yn– 2)},
(x – a)2 = f(a) + (x – a)f '(a) + –––––– f"(η) , a < η < x 2!
Numerical solution of differential equations dy For –– = f(x, y): dx Euler’s method : yr + 1 = yr + hf(xr, yr); xr+1 = xr + h
he m
b–a where h = ––––– n
The Gaussian 2-point integration rule 10
−h h f ( x )dx ≈ h f + f –h 3 3 Interpolation/finite differences
∫
f(x)
h
Runge-Kutta method (order 2) (modified Euler method) yr + 1 = yr + 1–2 (k1 + k2)
at
where k1 = h f(xr, yr), k2 = h f(xr + h, yr + k1) Runge-Kutta method, order 4:
n x – xi Lagrange’s polynomial : Pn(x) = ∑ Lr(x)f(x) where Lr(x) = ∏ –––––– x i=0 r – xi i≠r
Newton’s forward difference interpolation formula (x – x0)(x – x1) (x – x0) –––––––––––– f(x) = f(x0) + –––––– ∆f(x ) + ∆2f(x0) + ... 0 2!h2 h Newton’s divided difference interpolation formula
ics
f(x + h) – 2f(x) + f(x – h) f"(x) ≈ ––––––––––––––––––––– h2
&
k2 = hf(xr + 1–2 h, yr + 1–2 k1)
where k1 = hf(xr, yr)
St
k3 = hf(xr + 1–2 h, yr + 1–2 k2) Logic gates
f(x) = f[x0] + (x – x0]f[x0, x1] + (x – x0) (x – x1)f[x0, x1, x2] + ... Numerical differentiation
yr+1 = yr + 1–6 (k1 + 2k2 + 2k3 + k4),
NOT
OR
k4 = hf(xr + h, yr + k3).
at
ist ics AND
NAND
NUMERICAL ANALYSIS DECISION & DISCRETE MATHEMATICS
∫a ydx ≈
(x – a)2 = f(a) + (x – a)f '(a) + –––––– f"(a) + error 2!
b–a + y1 1– + ... + yn – 1 1– + yn – 1– ), where h = ––––– n 2 2 2
Simpson’s rule for n even b
Of
f(x)