Ask Your Question

Revision history [back]

solve: Possible bug?

Hello,

This question is relevant to Question #2 in the topic "desolve: wrong solution?!". If desolve is using solve internally when initial conditions are invoked to find the constants after obtaining the general solution, perhaps this is where the problem lies.

Consider the following expression

a=var('a')
f=-1/2*(I*sqrt(3)*2^(1/3) - 2^(1/3))/(-2*a - 1)^(1/3)
sol=solve(f==-2,a);show(sol)

sol is [a == (-5/8)]

Now, if we plug that back in f,

check=f.subs(sol).n();print(check`)

this gives 1.00000000000000 - 1.73205080756888*I, where it ought to give -2.

And I tried this with Mathematica also

Solve[-1/2 (I Sqrt[3] 2^(1/3) - 2^(1/3))/(-2 a - 1)^(1/3) == -2, a]

It returns an empty list {} for this.

What is wrong with Sage's solve function here?

solve: Possible bug?

Hello,

This question is relevant to Question #2 in the topic "desolve: wrong solution?!". If desolve is using solve internally when initial conditions are invoked to find the constants after obtaining the general solution, perhaps this is where the problem lies.

Consider the following expression

a=var('a')
f=-1/2*(I*sqrt(3)*2^(1/3) - 2^(1/3))/(-2*a - 1)^(1/3)
sol=solve(f==-2,a);show(sol)

sol is [a == (-5/8)]

Now, if we plug that back in f,

check=f.subs(sol).n();print(check`)

this gives 1.00000000000000 - 1.73205080756888*I, where it ought to give -2.-2 (if there is a solution)

And I tried this with Mathematica also

Solve[-1/2 (I Sqrt[3] 2^(1/3) - 2^(1/3))/(-2 a - 1)^(1/3) == -2, a]

It returns an empty list {} for this. this, indicating that there is no solution.

What is wrong with Sage's solve function here? here?

solve: Possible bug?

Hello,

This question is relevant to Question #2 in the topic "desolve: wrong solution?!". If desolve is using solve internally when initial conditions are invoked to find the constants after obtaining the general solution, perhaps this is where the problem lies.

Consider the following expression

a=var('a')
f=-1/2*(I*sqrt(3)*2^(1/3) - 2^(1/3))/(-2*a - 1)^(1/3)
sol=solve(f==-2,a);show(sol)

sol is [a == (-5/8)]

Now, if we plug that back in f,

check=f.subs(sol).n();print(check`)

this gives 1.00000000000000 - 1.73205080756888*I, where it ought to give -2 (if there is a solution)

And I tried this with Mathematica also

Solve[-1/2 (I Sqrt[3] 2^(1/3) - 2^(1/3))/(-2 a - 1)^(1/3) == -2, a]

It returns an empty list {} for this, indicating that there is no solution.

What is wrong with Sage's solve function here?

Update: I tried solve with "sympy" agorithm. It agreed with Mathematica. It looks like there is a problem with Maxima