A concave function is a function in which no line segment joining two points on its graph lies above the graph at any point.
A convex function, on the other hand, is a function in which no line segment joining two points on the graph lies below the graph at any point.
It means that, if f(x)f(x) is more than the average of f(x+-lambda)f(x±λ) than the function is concave and if f(x)f(x) is less than the average of f(x+-lambda)f(x±λ) than the function is convex.
Hence to find the convexity or concavity of f(x)=5x^3-2x^2+5x+12f(x)=5x3−2x2+5x+12 at x=-1x=−1, let us evaluate f(x)f(x) at x=-1.5, -1 and -0.5x=−1.5,−1and−0.5.
f(-1.5)=5(-3/2)^3-2(-3/2)^2+5(-3/2)+12=-135/8-45/4-15/2+12=(-135-90-60+96)/8=-189/8f(−1.5)=5(−32)3−2(−32)2+5(−32)+12=−1358−454−152+12=−135−90−60+968=−1898
f(-1)=5(-1)^3-2(-1)^2+5(-1)+12=-5-2-5+12=0f(−1)=5(−1)3−2(−1)2+5(−1)+12=−5−2−5+12=0
f(-0.5)=5(-1/2)^3-2(-1/2)^2+5(-1/2)+12=-5/8-2/4-5/2+12=(-5-4-20+96)/8=67/8f(−0.5)=5(−12)3−2(−12)2+5(−12)+12=−58−24−52+12=−5−4−20+968=678
The average of f(-1.5)f(−1.5) and f(-0.5)f(−0.5) is (-189/8+67/8)/2=-122/(2xx8)=-61/8−1898+6782=−1222×8=−618
As, this is less than f(-1)f(−1), at f(-1)f(−1) the function is concave.
graph{5x^3-2x^2+5x+12 [-2, 2, -20, 20]}