0
$\begingroup$

This question already has an answer here:

I have a pair of coupled polynomial equations that I need to solve, so I tried using Mathematica's solve tool. This is the code that I wrote:

Solve[4*x^3 *(a^2 - y^2) + 6*x^2 * (a - y)^2  + 6*x^2 == 0 && 
x^3*(2*(a - y)^2 + x*(a^2 - y^2 )) + x^6 == 0, {x, y}, Reals,]

But I'm getting the following message and output: enter image description here

I think the message is trying to tell me that I have given more variables than equations, but I listed only x and y as my variables, and have provided only two equations. On the other hand, I have no idea how to interpret this "stand-in" symbol(the #) that keeps popping up in my output, which is not even close to what it should be(although I guess fixing the errors will rectify this).

Can someone please explain these peculiarities and how to deal with them?

$\endgroup$

marked as duplicate by Lukas Lang, rhermans, Mr.Wizard Jul 15 '18 at 0:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Look at the documentation of Root (the symbol that is wrapped around the slots (the #1)) - that should answer your question $\endgroup$ – Lukas Lang Jul 14 '18 at 17:32
  • 2
    $\begingroup$ Use Reduce instead of Solve and you will obtain a closed-form expression in version 11.3. $\endgroup$ – user64494 Jul 14 '18 at 18:52
1
$\begingroup$

I am not sure what is meant by "stand-in symbol". The message is just a warning that some solution(s) only solve for one variable. The reason is that is x=0 then both equations vanish independent of y.

To remove this situation one can "quotient out" that solution (I use the term informally, but it does correspond to an ideal quotient in commutative algebra). The method is quite simple: just add a new variable and equation forcing x not to vanish. I added x*xr==1 where xr is meant to denote "reciprocal of x". The version below will give a solution set sans warning message.

Solve[{4*x^3*(a^2 - y^2) + 6*x^2*(a - y)^2 + 6*x^2 == 0, 
  x^3*(2*(a - y)^2 + x*(a^2 - y^2)) + x^6 == 0, x*xr == 1}, {xr, x, 
  y}, Reals]

You might consider not using the domain specification Reals because it complicates the solution set with conditions on the parameter a (but if you really require those conditions then it's of course fine to retain the domain specification).

$\endgroup$
  • $\begingroup$ I meant the # symbol followed by 1; it popped up one time in place of the variable when I typed f' instead of f'[x], so I just assumed it is a stand-in symbol for a variable. I just tried your code, and there is no error. However, there are still lots of these "slot" symbols, but I need an expression that gives me a real x and y(these are physical quantities) in terms of a. And I still don't understand what to make of these "slots". $\endgroup$ – pkg Jul 14 '18 at 20:12
  • $\begingroup$ Ah. The responses by @JohnDoty and @HenrikSchumacher explain that. In short, they are needed to express Root objects that encode solutions in a manner that generalizes radicals. (Okay, maybe that wasn't so short...) $\endgroup$ – Daniel Lichtblau Jul 15 '18 at 14:48
1
$\begingroup$
soln = Solve[{4*x^3*(a^2 - y^2) + 6*x^2*(a - y)^2 + 6*x^2 == 0, 
x^3*(2*(a - y)^2 + x*(a^2 - y^2)) + x^6 == 0, x*xr == 1}, {xr, x, 
y}, Reals];
soln /. a -> 1.5

Yielding:

{{xr -> Undefined, x -> Undefined, y -> Undefined}, 
{xr -> Undefined, x -> Undefined, y -> Undefined}, 
{xr -> 0.896557, x -> 1.11538, y -> 1.97412}, 
{xr -> Undefined, x -> Undefined, y -> Undefined}, 
{xr -> 1.38467, x -> 0.722195, y -> 2.99889}, 
{xr -> Undefined, x -> Undefined, y -> Undefined}, 
{xr -> Undefined, x -> Undefined, y -> Undefined}, 
{xr -> Undefined, x -> Undefined, y -> Undefined}, 
{xr -> Undefined, x -> Undefined, y -> Undefined}, 
{xr -> Undefined, x -> Undefined, y -> Undefined}}

To get a numeric answer, you must provide a value for a. The Undefined values correspond to solutions that are complex.

Root objects on polynomial functions are a generalization of radicals, especially useful in cases, as here, where no representation of the expression in terms of radicals exists. Treat them the way you'd treat Sqrt[a].

If you use the exact 3/2 rather than the approximate 1.5 above, you get much longer expressions involving Root objects with exact constant coefficients. These represent exact algebraic numbers, just like Sqrt[3/2] does.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.