Chapter 8: Performance Surfaces and Optimum Points: Brandon Morgan 1/14/2021

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Chapter 8: Performance Surfaces and Optimum Points

Brandon Morgan

1/14/2021

E8.1
We are given the following scalar function

1
F (x) =
x3 − 0.75x − 0.5
The second-order Taylor series approximation for a scalar function, F (x), is given by:

d 1 d2
F (x) = F (x∗ ) + F (x)|x=x∗ (x − x∗ ) + F (x)|x=x∗ (x − x∗ )2
dx 2 dx2
Here we get the following first and second derivatives of the function:

3x2 − 0.75
F 0 (x) = −
(x3 − 0.75x − 0.5)2

2(−6x4 + 2.25x2 − 1.5x − 0.5625)


F 00 (x) = −
(x3 − 0.75x − 0.5)3

Thus, we end up with the following expansion:

1 3(x∗ )2 − 0.75 ∗ 1 2(−6(x∗ )4 + 2.25(x∗ )2 − 1.5(x∗ ) − 0.5625)


F (x) = − (x−(x ))− (x−(x∗ ))2
(x∗ )3 − 0.75(x∗ ) − 0.5 ((x∗ )3 − 0.75(x∗ ) − 0.5)2 2 ((x∗ )3 − 0.75(x∗ ) − 0.5)3

When x∗ = −0.5, our Taylor expansion reduces down to:

F (x) = −4 + 0(x + 0.5) + 24(x + 0.5)2 = −4 + 24(x + 0.5)2

When x∗ = 1.1, our Taylor expansion reduces down to:

F (x) = 166.67 − 80000(x − 1.1) + 3.83 ∗ 107 (x − 1.1)2

1
3
We can now plot our scalar function and its second order Taylor expansion at each point to obersve its
accuracy.

library(ggplot2)

## Warning: package ’ggplot2’ was built under R version 3.6.3

fun = function(x) { # our original function


1/(x^3-0.75*x-0.5)
}
secondDegree1 = function(x) { # taylor expansion at -0.5
-4+24*(x+0.5)^2
}
secondDegree2 = function(x) { # taylor expansion at 1.1
166.67-80000*(x-1.1)+3.83*(10^7)*(x-1.1)^2
}

Second-order term aat x = −0.5

ggplot(data.frame(x=c(-1, 0)), aes(x=x))+stat_function(fun=fun, color = "blue")+


stat_function(fun=secondDegree1, color = "red")+
scale_y_continuous(limits = c(-7,7))+geom_hline(yintercept=0)+geom_vline(xintercept = 0)

0
y

−4

−1.00 −0.75 −0.50 −0.25 0.00


x

2
As we can see from the plot above, our second order Taylor approximation does a very good job of approxi-
mating our function at the point x = −0.5 within a small interval.

Second-order term at x = 1.1

ggplot(data.frame(x=c(0.5, 1.5)), aes(x=x))+stat_function(fun=fun, color = "blue")+geom_hline(yintercept

−40
y

−80

−120

0.0 0.5 1.0 1.5


x

ggplot(data.frame(x=c(0.5, 1.5)), aes(x=x))+stat_function(fun=secondDegree2, color = "red")+geom_hline(y

3
4e+07

3e+07
y

2e+07

1e+07

0e+00

0.0 0.5 1.0 1.5


x

Unfortunately, I was unable to plot both functions on top of each other; however, we can see that our function
approaches infinity as x → 1.1 from both sides. Because this point is undefined, our Taylor approximation
does a poor job at approximating this point, as one can tell from its graph.

You might also like