Message Boards Message Boards

How I can introduce constants on Wolfram?

Posted 10 years ago

I want to solve this:

" y= sqrt { { a }^{ 2 }+{ x }^{ 2 } } + sqrt { { (b-x) }^{ 2 }+{ c }^{ 2 } }

minimize this expression. a, b, c are constants."

But I want to use a, b and c as constants. How I can compute it here?

POSTED BY: Bryan Maia

Are you using Mathematica or Wolfram|Alpha? If you are using Mathematica then compute the problem using the function Minimize as in

Minimize[Sqrt[c^2 + (b - x)^2] + Sqrt[a^2 + x^2], x]

if you are using Wolfram|Alpha then the query would be

minimize sqrt { { a }^{ 2 }+{ x }^{ 2 } } + sqrt { { (b-x) }^{ 2 }+{ c }^{ 2 } } with respect to x

however, it turns out that Wolfram|Alpha does not parse this properly. If one instead only uses parentheses for the expression as in

minimize sqrt ( ( a )^( 2 )+( x )^( 2 ) ) + sqrt ( ( (b-x) )^( 2 )+( c )^( 2 ) ) with respect to x

then Wolfram|Alpha parses it correctly but says that there are no global minima and does not return a result. However there are global minima for this function for various values of a,b, and c.

POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract