Skip to main content
Tweeted twitter.com/#!/StackMma/status/646168359273410560
deleted 26 characters in body
Source Link
David G. Stork
  • 43k
  • 3
  • 40
  • 110

Here is a very simple set of equations to solve:

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)}, {dbtot, dib}] 

{{dbtot -> 2.06155, dib -> -0.178513}}

This is the correct answer.

However, if I merely need dib and list it as the solution variable...

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)} , {dib}] 

{{dib -> -0.217687}, {dib -> -0.178513}}

This contains the correct solution (dib -> -0.178513) as well as an incorrect answer (based on an impossible negative value of dbtot).

I've tried Assuming and With and incorporating constraints such as dbtot > 0. All are (I think) unnecessary and none of them work.

How do I use Solve to get the single correct value for dib?

An even more elementary illustration of the problem is here:

Solve[{r == .4, dbtot == 2.12132, 1/dib == -2/r - 1/(dbtot2.12132 - r)}, dib]{dib}] 

{}

What could be simpler than that?!

Here is a very simple set of equations to solve:

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)}, {dbtot, dib}] 

{{dbtot -> 2.06155, dib -> -0.178513}}

This is the correct answer.

However, if I merely need dib and list it as the solution variable...

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)} , {dib}] 

{{dib -> -0.217687}, {dib -> -0.178513}}

This contains the correct solution (dib -> -0.178513) as well as an incorrect answer (based on an impossible negative value of dbtot).

I've tried Assuming and With and incorporating constraints such as dbtot > 0. All are (I think) unnecessary and none of them work.

How do I use Solve to get the single correct value for dib?

An even more elementary illustration of the problem is here:

Solve[{r == .4, dbtot == 2.12132, 1/dib == -2/r - 1/(dbtot - r)}, dib] 

{}

What could be simpler than that?!

Here is a very simple set of equations to solve:

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)}, {dbtot, dib}] 

{{dbtot -> 2.06155, dib -> -0.178513}}

This is the correct answer.

However, if I merely need dib and list it as the solution variable...

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)} , {dib}] 

{{dib -> -0.217687}, {dib -> -0.178513}}

This contains the correct solution (dib -> -0.178513) as well as an incorrect answer (based on an impossible negative value of dbtot).

I've tried Assuming and With and incorporating constraints such as dbtot > 0. All are (I think) unnecessary and none of them work.

How do I use Solve to get the single correct value for dib?

An even more elementary illustration of the problem is here:

Solve[{r == .4, 1/dib == -2/r - 1/(2.12132 - r)}, {dib}] 

{}

What could be simpler than that?!

added 214 characters in body
Source Link
David G. Stork
  • 43k
  • 3
  • 40
  • 110

Here is a very simple set of equations to solve:

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)}, {dbtot, dib}] 

{{dbtot -> 2.06155, dib -> -0.178513}}

This is the correct answer.

However, if I merely need dib and list it as the solution variable...

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)} , {dib}] 

{{dib -> -0.217687}, {dib -> -0.178513}}

This contains the correct solution (dib -> -0.178513) as well as an incorrect answer (based on an impossible negative value of dbtot).

I've tried Assuming and With and incorporating constraints such as dbtot > 0. All are (I think) unnecessary and none of them work.

How do I use Solve to get the single correct value for dib?

An even more elementary illustration of the problem is here:

Solve[{r == .4, dbtot == 2.12132, 1/dib == -2/r - 1/(dbtot - r)}, dib] 

{}

What could be simpler than that?!

Here is a very simple set of equations to solve:

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)}, {dbtot, dib}] 

{{dbtot -> 2.06155, dib -> -0.178513}}

This is the correct answer.

However, if I merely need dib and list it as the solution variable...

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)} , {dib}] 

{{dib -> -0.217687}, {dib -> -0.178513}}

This contains the correct solution (dib -> -0.178513) as well as an incorrect answer (based on an impossible negative value of dbtot).

I've tried Assuming and With and incorporating constraints such as dbtot > 0. All are (I think) unnecessary and none of them work.

How do I use Solve to get the single correct value for dib?

Here is a very simple set of equations to solve:

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)}, {dbtot, dib}] 

{{dbtot -> 2.06155, dib -> -0.178513}}

This is the correct answer.

However, if I merely need dib and list it as the solution variable...

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)} , {dib}] 

{{dib -> -0.217687}, {dib -> -0.178513}}

This contains the correct solution (dib -> -0.178513) as well as an incorrect answer (based on an impossible negative value of dbtot).

I've tried Assuming and With and incorporating constraints such as dbtot > 0. All are (I think) unnecessary and none of them work.

How do I use Solve to get the single correct value for dib?

An even more elementary illustration of the problem is here:

Solve[{r == .4, dbtot == 2.12132, 1/dib == -2/r - 1/(dbtot - r)}, dib] 

{}

What could be simpler than that?!

Source Link
David G. Stork
  • 43k
  • 3
  • 40
  • 110

Different results from Solve depending upon the solution variables listed

Here is a very simple set of equations to solve:

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)}, {dbtot, dib}] 

{{dbtot -> 2.06155, dib -> -0.178513}}

This is the correct answer.

However, if I merely need dib and list it as the solution variable...

Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)} , {dib}] 

{{dib -> -0.217687}, {dib -> -0.178513}}

This contains the correct solution (dib -> -0.178513) as well as an incorrect answer (based on an impossible negative value of dbtot).

I've tried Assuming and With and incorporating constraints such as dbtot > 0. All are (I think) unnecessary and none of them work.

How do I use Solve to get the single correct value for dib?