x is number of trees per acre and y is yield in bushels per acre
For x<40 y=25x
For x≥40
y=(25-1/2(x-40))x
y=(25-1/2x+20)
y=-x2/2+45x
Maximum where derivative is zero or an end point
dy/dx=-x+45
0=-x+45
x=45
end points are x=40 or x=90
test these or do first or second derivative test
Test values
y=-(40)2/2+45(40)=1000
y=-(45)2/2+45(45)=1012.5
y=-(90)2/2+45(90)=0
Absolute max x=45
First derivative test:
test to the left and right of critical point to see if it is a max or min
less than 45 (but more than 40 because it must be in the domain)
x=43
dy/dx=-43+45=2 derivative is positive when x is less than 45
more than 45 (but less than 90 because it must be in the domain)
x=50
dy/dx=-50+45=-5 derivative is positive when x is more than 45
because the derivative is positive from 40 to 45 yield is increasing from x=40 to x=45
because the derivative is negative from 45 to 90 yield is increasing from x=45 to x=90
This means x=45 is a local max and since there are no other critical values then it is higher than the two endpoints
Second derivative test
d2y/dx2=-1
second derivative is negative so that means y is concave down so x=45 (the critical point above) is a local maximum. since there are no changes in concavity and only one critical value x=45 is the absolute max