You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I curruntly observed a strange behavior of the symbolic computation. I was trying to find the minimize of a quadratic function, by looking for the unique zero of its derivative (since its derivative is an affine function). But I finally find at least 3 zeros for this affine function. Could you please help me to figure out the problem?
In the following code, the variable is b, and the other variables are considered as parameters. The quadratic function is given by r, its derivative with respect to b is given by dr. At the end of the code, I printed three values which make the affine function equal to zero.
#############################
using Symbolics
let
@variables b, p, c, d, e, f, g, h
a(b) = -c/d - b*e/d
r(b) = c + 2*a(b)*d + 2*b*e + a(b)*a(b)*f+ 2*a(b)*b*g+ b*b*h
sss(b) = c + 2*a(b)*d + 2*b*g + a(b)*a(b)*f+ 2*a(b)*b*g+ b*b*h
dr(b) = Symbolics.derivative(r(b), b)
dssss(b) = Symbolics.derivative(sss(b), b)
c_r = Symbolics.solve_for(dr(b) ~ 0,b)
c_s = Symbolics.solve_for(dssss(b) ~ 0,b)
@show simplify(r(b))
@show simplify(dr(b))
@show simplify(c_r)
@show simplify(c_s)
@show simplify(dr(c_s))
@show simplify(dr(1))
@show simplify(dr(c_r))
end
#####################
The text was updated successfully, but these errors were encountered:
Hello, I curruntly observed a strange behavior of the symbolic computation. I was trying to find the minimize of a quadratic function, by looking for the unique zero of its derivative (since its derivative is an affine function). But I finally find at least 3 zeros for this affine function. Could you please help me to figure out the problem?
In the following code, the variable is b, and the other variables are considered as parameters. The quadratic function is given by r, its derivative with respect to b is given by dr. At the end of the code, I printed three values which make the affine function equal to zero.
#############################
#####################
The text was updated successfully, but these errors were encountered: