# Solve this equation symbolically

I am trying to solve the equation for the quantity r = y/x symbolically:

3/y^4 == 3/x^4 + a/(x + 2 y)^4


with the requirement that we need to perform the substitution y -> r x and use Thread to factor both sides of the equation at the same time.

Here is my attempt:

In: {3/y^4 == 3/x^4 + a/(x + 2 y)^4} /. y-> r x


Out: {3/(r^4 x^4) == 3/x^4 + a/(x + 2 r x)^4}

But the above method of course is not completely correct. If I used thread, the output does not change:

In: Thread[{3/y^4 == 3/x^4 + a/(x + 2 y)^4} /. y-> r x]


Out: {3/(r^4 x^4) == 3/x^4 + a/(x + 2 r x)^4}

Then I think I have to factor them first by using Thread to both sides:

In: Solve[Thread[Factor[{3/y^4 == 3/x^4 + a/(x + 2 y)^4} /. y -> r x], Equal], r]


Out: {{r -> Root[-3 - 24 #1 - 72 #1^2 - 96 #1^3 + (-45 + a) #1^4 + 24 #1^5 + 72 #1^6 + 96 #1^7 + 48 #1^8 &, 1]},
{r -> Root[-3 - 24 #1 - 72 #1^2 - 96 #1^3 + (-45 + a) #1^4 + 24 #1^5 + 72 #1^6 + 96 #1^7 + 48 #1^8 &, 2]},
{r -> Root[-3 - 24 #1 - 72 #1^2 - 96 #1^3 + (-45 + a) #1^4 + 24 #1^5 + 72 #1^6 + 96 #1^7 + 48 #1^8 &, 3]},
{r -> Root[-3 - 24 #1 - 72 #1^2 - 96 #1^3 + (-45 + a) #1^4 + 24 #1^5 + 72 #1^6 + 96 #1^7 + 48 #1^8 &, 4]},
{r -> Root[-3 - 24 #1 - 72 #1^2 - 96 #1^3 + (-45 + a) #1^4 + 24 #1^5 + 72 #1^6 + 96 #1^7 + 48 #1^8 &, 5]},
{r -> Root[-3 - 24 #1 - 72 #1^2 - 96 #1^3 + (-45 + a) #1^4 + 24 #1^5 + 72 #1^6 + 96 #1^7 + 48 #1^8 &, 6]},
{r -> Root[-3 - 24 #1 - 72 #1^2 - 96 #1^3 + (-45 + a) #1^4 + 24 #1^5 + 72 #1^6 + 96 #1^7 + 48 #1^8 &, 7]},
{r -> Root[-3 - 24 #1 - 72 #1^2 - 96 #1^3 + (-45 + a) #1^4 + 24 #1^5 + 72 #1^6 + 96 #1^7 + 48 #1^8 &, 8]}}

I am not sure whether my approach is correct.

Then if I want to plot the solution for a$\in${-1,1} which is to examine the number of solutions which are real-valued. Here is what I did:

Plot[Table[Solve[Thread[Factor[{3/y^4 == 3/x^4 + a/(x + 2 y)^4} /. y -> r x], Equal], r], {a, -1, 1, 0.02}], {r, -100, 100}]


The output showed error and said ivar is not a valid variable. I am not sure what went wrong and how to fix it.

Any helps and comments are greatly welcomed.

Many thanks.

-
What do you mean by "But the above method of course is not correct?" You performed the same transformation to both sides of the equation; why is that not correct? What output do you wish to get? – Mr.Wizard May 18 '13 at 7:47
If you just want to solve equations symbolically, why not use Solve ? – xzczd May 18 '13 at 7:50
@Mr.Wizard I mean it is not an entirely correct method to solve the problem, which is to use Thread to factor both sides of the equation at the same time then solve the equation. – user71346 May 18 '13 at 7:51
Please edit your question to include exactly what you expect for output, and the logic by which that is arrived at. I cannot provide an answer to the question in its present state. – Mr.Wizard May 18 '13 at 7:53
@xzczd I tried using Solve but it wasn't successful as well. This is what I did Solve[{3/y^4 == 3/x^4 + a/(x + 2 y)^4} /. y-> r x, r]. But the question wants to use Thread, so I assume we cannot use solve. – user71346 May 18 '13 at 7:55

I'm still not sure what you're aiming for but if you have been instructed to use Thread perhaps this will help:

eqn = (3/y^4 == 3/x^4 + a/(x + 2 y)^4) /. y -> r x;


3 == r^4 x^4 (3/x^4 + a/(x + 2 r x)^4)


This merely demonstrates using Thread to apply an operation to both sides of the equation at once.

Or, seeing your latest edit, perhaps this is worth a look:

sols = Solve[3/y^4 == 3/x^4 + a/(x + 2 y)^4 /. y -> r x, r];

vals = r /. sols;

Plot3D[vals, {a, -1, 1}, {r, -100, 100}]


-
Thank you. Your method is correct. Now what if I want to solve for r? Can I just do Solve[3 == r^4 x^4 (3/x^4 + a/(x + 2 r x)^4), r]? If you try it, the output doesn't look good, not sure whether that is correct. Thanks – user71346 May 18 '13 at 11:07
I am aiming at solving for r. Then analyse the solutions r by varying the values of a. I hope it is clear. – user71346 May 18 '13 at 11:08
@user71346 I see I missed a major aspect of your updated question: the Root objects! Please see this fine answer. – Mr.Wizard May 18 '13 at 11:11
Thanks a lot. Your answer helps so much. I have accepted and voted for your answer. Just an extra question, can you see whether the solutions are real-valued and how many of them are? I don't know how to tell from the diagram. Don't worry if cannot answer this. Thanks for all your helps. – user71346 May 18 '13 at 11:24
@user71346 you could substitute an arbitrary real value for a and convert to numeric values with N. This will not prove that certain solutions are always real (I think), but it can help you eliminate the ones that return complex values. Try: sols /. a -> 1 // N – Mr.Wizard May 18 '13 at 11:30