I'm trying to learn sympy's calculus functions and I'm able to get as far as getting the roots of the second derivative for the critical points of the extrema via:
import numpy as np from numpy import linspace, math, arange, linspace from sympy import * import sympy as sp import math x = Symbol('x') f = (x**4) - (24*x**2) + 80 fd = diff(f) fdd = diff(fd) print(fd) print(fdd) polyRoots = solveset(f,x) dRoots = solveset(fd,x) #gets critical x values ddRoots = solveset(fdd,x)
How do I substitute the values I get from dRoots into the original equation, f, and have it output a list of values?