We would like to understand the general model \(f_2(x; a_0,a_1,a_2) = a_0 + a_1x + a_2x^2\) where \(x \geq 0\). How does the behavior of this model change when we change the values of the parameters \(a_0\), \(a_1\), and \(a_2\)?

Upon exploring the function \(f_2\), we find the parameter \(a_0\) shifts the function vertically. In fact, the \(y\)-intercept of \(f_2\) is \(a_0\) because when \(x=0\) we see \(f_2(0) = a_0 + a_1(0) + a_2(0^2) = a_0 + 0 + 0 = a_0\). This behavior is demonstrated in the figure below.

On the right \(a_0 = 80\), \(a_1 = 0.03\), and \(a_2 = -0.00001\), \(f_2(x) = 80 + 0.03x - 0.00001x^2\) with \(x \geq 0\).

On the left \(a_0 = 40\), \(a_1 = 0.03\), and \(a_2 = -0.00001\), \(f_2(x) = 40 + 0.03x - 0.00001x^2\) with \(x \geq 0\).

x <- seq(-500,3000,5)

f <- function(x,a0=0,a1=0,a2=1){
  a0 + a1*x + a2*x^2
}
y1 <- f(x,80,0.03,-0.00001)
y2 <- f(x,40,0.03,-0.00001)


par(mfrow=c(1,2),mar=c(5,5,0.5,0.25),oma=c(0,0,2,0))
plot(x,y1,ylim=c(0,120),type='l',xlab="x",ylab='f(x)')
abline(h=0,lty=3,col='gray')
abline(v=0,lty=3,col='gray')
plot(x,y2,ylim=c(0,120),type='l',xlab="x",ylab='f(x)')
abline(h=0,lty=3,col='gray')
abline(v=0,lty=3,col='gray')
mtext('figure 1',outer=TRUE)

We see the curve in the right plot has a \(y\)-intercept (0,80) and the curve in the left plot has a \(y\)-intercept (0,40). Changing \(a_0\) from 80 to 40 shifts the curve down.

In the figures below we will demonstrate how the parameters \(a_1\) and \(a_2\) change the behavior of the function \(f_2\).

In the next figure the parameter values used are stated below.

On the right \(a_0 = 80\), \(a_1 = -0.03\), and \(a_2 = -0.00001\), \(f_2(x) = 80 - 0.03x - 0.00001x^2\) with \(x \geq 0\).

On the left \(a_0 = 80\), \(a_1 = 0.03\), and \(a_2 = -0.00001\), \(f_2(x) = 80 + 0.03x - 0.00001x^2\) with \(x \geq 0\).

x <- seq(-3000,3000,5)

f <- function(x,a0=0,a1=0,a2=1){
  a0 + a1*x + a2*x^2
}
y1 <- f(x,80,-0.03,-0.00001)
y2 <- f(x,80,0.03,-0.00001)


par(mfrow=c(1,2),mar=c(5,5,0.5,0.25),oma=c(0,0,2,0))
plot(x,y1,ylim=c(0,120),type='l',xlab="x",ylab='f(x)')
abline(h=0,lty=3,col='gray')
abline(v=0,lty=3,col='gray')
plot(x,y2,ylim=c(0,120),type='l',xlab="x",ylab='f(x)')
abline(h=0,lty=3,col='gray')
abline(v=0,lty=3,col='gray')
mtext('figure 2',outer=TRUE)

We see \(a_1\) changes the location of the peak. In the right plot, when \(a_1 < 0\) the peak is on the left of the \(x\)-axis. In the left plot, when \(a_1 > 0\) the peak is on the right of the \(x\)-axis. In this figure with \(a_2 < 0\) the graphs opens down.

In the next figure the parameter values used are stated below.

On the right \(a_0 = 80\), \(a_1 = -0.03\), and \(a_2 = 0.00001\), \(f_2(x) = 80 - 0.03x + 0.00001x^2\) with \(x \geq 0\).

On the left \(a_0 = 80\), \(a_1 = 0.03\), and \(a_2 = 0.00001\), \(f_2(x) = 40 + 0.03x + 0.00001x^2\) with \(x \geq 0\).

x <- seq(-3000,3000,5)

f <- function(x,a0=0,a1=0,a2=1){
  a0 + a1*x + a2*x^2
}
y1 <- f(x,80,-0.03,0.00001)
y2 <- f(x,80,0.03,0.00001)


par(mfrow=c(1,2),mar=c(5,5,0.5,0.25),oma=c(0,0,2,0))
plot(x,y1,ylim=c(0,120),type='l',xlab="x",ylab='f(x)')
abline(h=0,lty=3,col='gray')
abline(v=0,lty=3,col='gray')
plot(x,y2,ylim=c(0,120),type='l',xlab="x",ylab='f(x)')
abline(h=0,lty=3,col='gray')
abline(v=0,lty=3,col='gray')
mtext('figure 3',outer=TRUE)

Once again, we see \(a_1\) changes the location of the peak. In the right plot, when \(a_1 < 0\) the peak is on the right of the \(x\)-axis. In the left plot, when \(a_1 > 0\) the peak is on the left of the \(x\)-axis. In this figure with \(a_2 > 0\) the graphs opens up.

In the next figure the parameter values used are stated below.

On the right \(a_0 = 80\) and \(a_2 = -0.00001\). The value of \(a_1\) is 0.03 for the blue curve and 0.01 for the green curve.

\(f_2(x) = 80 + 0.03x - 0.00001x^2\) with \(x \geq 0\) (blue curve, right plot)

\(f_2(x) = 80 + 0.01x - 0.00001x^2\) with \(x \geq 0\) (blue curve, right plot)

On the left \(a_0 = 80\) and \(a_2 = 0.00001\). The value of \(a_1\) is -0.03 for the blue curve and -0.01 for the green curve.

\(f_2(x) = 80 - 0.03x + 0.00001x^2\) with \(x \geq 0\) (blue curve, left plot)

\(f_2(x) = 80 - 0.01x + 0.00001x^2\) with \(x \geq 0\) (blue curve, left plot)

x <- seq(-500,3000,5)

f <- function(x,a0=0,a1=0,a2=1){
  a0 + a1*x + a2*x^2
}
y1 <- f(x,80,0.03,-0.00001)
y2 <- f(x,80,0.01,-0.00001)

y3 <- f(x,80,-0.03,0.00001)
y4 <- f(x,80,-0.01,0.00001)


par(mfrow=c(1,2),mar=c(5,5,0.5,0.25),oma=c(0,0,2,0))
plot(x,y1,ylim=c(0,120),type='l',xlab="x",ylab='f(x)',col='blue')
lines(x,y2,col='green')
abline(h=0,lty=3,col='gray')
abline(v=0,lty=3,col='gray')
plot(x,y3,ylim=c(0,120),type='l',xlab="x",ylab='f(x)',col='blue')
lines(x,y4,col='green')
abline(h=0,lty=3,col='gray')
abline(v=0,lty=3,col='gray')
mtext('figure 4',outer=TRUE)

We see as \(a_1\) get closer to zero, the height of the peak gets smaller (left plot) or the place of the valley is higher (right plot). We also see the width of the opening at \(y =80\) is less when \(a_1\) gets closer to zero. We also see the curve at (0,80) is less steep when \(a_1\) is closer to zero.

In summary, we have observed some key characteristics of \(f_2\) influenced by the parameters \(a_0\), \(a_1\), and \(a_2\). We see \(a_0\) shifts the curve up and down and \(a_2\) determines whether the curve opens up or opens down. We also see that \(a_1\) is involved with which side of the \(y\)-axis the peak (or valley) is and how wide the opening of the curve will be. We have also seen there there is some interaction between \(a_1\) and \(a_2\) in these behaviors.