We know that :
a(-1)^3 + b(-1)^2 + c(-1)b+ d = 2 simplifiy
-1a + b - c + d = 2 (1)
Also
a(1)^3 + b(-1)^2 + c(1) + d = -1 simplify
a + b + c + d = -1 (2)
Adding (1) and (2), we have
2b + 2d = 1 (3)
Subtracting (1) and (2), we have
-2a - 2c = 3 (4)
Taking the derivative, we get
f' (x) = 3ax^2 + 2bx + c
And f'(-1) = 0 .....so we have
3a(-1)^2 + 2b(-1) + c = 0
3a - 2b + c = 0 (5)
And f' (1) = 0 ........so we have
3a(1)^2 + 2b(1) + c = 0
3a + 2b + c = 0 (6)
Add (5) and (6)
6a + 2c = 0 (7)
Add (4) and (7) and we get that
4a = 3 so.....a = 3/4
Using (7)
6(3/4) + 2c = 0
9/2 = -2c
-9/4 = c
Using (6)
3(3/4)+ 2b - 9/4 = 0
So.....b = 0
Using (3)
2b + 2d = 1
2b + 2(0) = 1
2b = 1
b = 1/2
So.....the function is....
f(x) = (3/4)x^3 - (9/4)x + 1/2
Here's the graph : https://www.desmos.com/calculator/nffnruhqfi
