# Solve a parametric equation in 2 variables

I have a function in 2 variables $$F(x,y)$$, which also contains the constant parameters $$\epsilon_{1}$$, $$\epsilon_{2}$$,$$\beta$$. It is defined as:

F[x_,y_]:=(3 - 3 beta (e1 + e2) + 3/8 beta^2 (3 e1^2 + 2 e1 e2 + 3 e2^2) + (-1 + beta e1) (-4 + beta (e1 + 3 e2)) Cos[(3 x)/2] Cos[(Sqrt y)/2] + 1/8 (-4 + beta (e1 + 3 e2))^2 Cos[Sqrt y])


My goal is to find the solutions to the equation $$F(x,y)=0$$, i.e. the coordinates of the points (x,y) on the plane (as a function of the parameters $$\epsilon_{1}$$, $$\epsilon_{2}$$,$$\beta$$) where the function is 0. I'm looking for an analytic expression of these coordinates.

I've tried with

FindInstance[F[x,y] == 0, {x,  y}, Reals]


or something similar.

The problem is that it either returns me an error because of the presence of the parameters $$\epsilon_{1}$$, $$\epsilon_{2}$$,$$\beta$$, or it gives me a solution for these parameters as well, treating them as variables just like x,y.

So how can I find the solutions?

Let us do the following:

Step 1:

F[x_, y_] := (3 - 3 beta (e1 + e2) +
3/8 beta^2 (3 e1^2 + 2 e1 e2 + 3 e2^2) + (-1 + beta e1) (-4 +
beta (e1 + 3 e2)) Cos[(3 x)/2] Cos[(Sqrt y)/2] +
1/8 (-4 + beta (e1 + 3 e2))^2 Cos[Sqrt y])

eq1 = F[x, y] == 0


Step 2:

eq2 = eq1 /. Cos[(3 x)/2] -> z

(*   3 - 3 beta (e1 + e2) +
3/8 beta^2 (3 e1^2 + 2 e1 e2 + 3 e2^2) + (-1 + beta e1) (-4 +
beta (e1 + 3 e2)) z Cos[(Sqrt y)/2] +
1/8 (-4 + beta (e1 + 3 e2))^2 Cos[Sqrt y] == 0  *)


Step 3:

eq3 = Equal @@ Solve[eq2, z][[1, 1]] /. z -> Cos[(3 x)/2]

(*  Cos[(3 x)/
2] == ((-3 + 3 beta (e1 + e2) -
3/8 beta^2 (3 e1^2 + 2 e1 e2 + 3 e2^2) -
1/8 (-4 + beta (e1 + 3 e2))^2 Cos[Sqrt y]) Sec[(Sqrt y)/
2])/((-1 + beta e1) (-4 + beta (e1 + 3 e2)))  *)


Step 4:

eq4 = Map[ArcCos, eq3] /. ArcCos[Cos[t_]] :> t

(*  (3 x)/2 ==
ArcCos[((-3 + 3 beta (e1 + e2) -
3/8 beta^2 (3 e1^2 + 2 e1 e2 + 3 e2^2) -
1/8 (-4 + beta (e1 + 3 e2))^2 Cos[Sqrt y]) Sec[(Sqrt y)/
2])/((-1 + beta e1) (-4 + beta (e1 + 3 e2)))]  *)


Last step:

Solve[eq4, x][[1, 1]]

(*   x -> 2/3 ArcCos[((-3 + 3 beta (e1 + e2) -
3/8 beta^2 (3 e1^2 + 2 e1 e2 + 3 e2^2) -
1/8 (-4 + beta (e1 + 3 e2))^2 Cos[Sqrt y]) Sec[(Sqrt y)/
2])/((-1 + beta e1) (-4 + beta (e1 + 3 e2)))]   *)


Done. Have fun!

Solve[F[x, y] == 0, x]


Gives

{{x -> ConditionalExpression[
2/3 (-ArcCos[((-3 + 3 beta (e1 + e2) -
3/8 beta^2 (3 e1^2 + 2 e1 e2 + 3 e2^2) -
1/8 (-4 + beta (e1 + 3 e2))^2 Cos[Sqrt y]) Sec[(
Sqrt y)/2])/((-1 + beta e1) (-4 + beta (e1 + 3 e2)))] +
2 \[Pi] ConditionalExpression[1, \[Placeholder]]),
ConditionalExpression[1, \[Placeholder]] \[Element]
Integers]}, {x ->
ConditionalExpression[
2/3 (ArcCos[((-3 + 3 beta (e1 + e2) -
3/8 beta^2 (3 e1^2 + 2 e1 e2 + 3 e2^2) -
1/8 (-4 + beta (e1 + 3 e2))^2 Cos[Sqrt y]) Sec[(
Sqrt y)/2])/((-1 + beta e1) (-4 + beta (e1 + 3 e2)))] +
2 \[Pi] ConditionalExpression[1, \[Placeholder]]),
ConditionalExpression[1, \[Placeholder]] \[Element] Integers]}}


Notice the two solutions with + or - in front of the ArcCos[]
So your {x,y} points will be: Where is an integer.

sol = FindInstance[F[x, y] == 0, {x, y, e1, e2, beta}, Reals, 2]
F[x, y] == 0 /. sol // Simplify


{True, True}.

And the Reduce gave a complex expression.

(* Reduce[F[x, y] == 0, {x, y}, Reals] *)

Solve[F[x, y]== 0, {x, y}, Reals, Method -> Reduce]

period = FunctionPeriod[F[x, y], {x, y}]
sol = Solve[{F[x, y] == 0, 0 <= x <= period[],
0 <= y <= period[]}, {x, y}, Reals, Method -> Reduce]
F[x, y] == 0 /. sol // FullSimplify

• if I try this I get a solution also for the parameters e1, e2 and beta. But I only want to solve for the x,y variables and the solution for them will contain e1,e2,beta. Aug 25, 2022 at 16:19
• Try: Solve[F[x, y] == 0, y] of Solve[F[x,y]==0,x] Do not specify "Reals" as without more knowledge about the parameters, real solutions can not be garanteed. Aug 25, 2022 at 16:47

Regarding only real variables and parameters. Due to Cos multiple solutions represented by C1,C2

F[x_, y_] = (3 - 3 beta (e1 + e2) +
3/8 beta^2 (3 e1^2 + 2 e1 e2 + 3 e2^2) + (-1 + beta e1) (-4 +
beta (e1 + 3 e2)) Cos[(3 x)/2] Cos[(Sqrt y)/2] +
1/8 (-4 + beta (e1 + 3 e2))^2 Cos[Sqrt y]);

red3 = Reduce[F[x, y] == 0, {x, y}, Reals];

StandardForm[
red3 //. Or ->
Composition[(Column[#, Right, Background -> {{White, LightGray}},
Frame -> All] &), List]] 