private double FindRoot(double a, double b, double c, double d, double target)
{
double x0 = 1.0; // 初始猜测值
double epsilon = 0.0001; // 迭代精度
double f(double t) => a * t * t * t + b * t * t + c * t + d - target; // 定义方程
double df(double t) => 3 * a * t * t + 2 * b * t + c; // 方程的导数
double x1 = x0 - f(x0) / df(x0); // 牛顿迭代公式
while (Math.Abs(x1 - x0) > epsilon)
{
x0 = x1;
x1 = x0 - f(x0) / df(x0);
}
return x1;
}