Equation different plots

I have this equation to plot.

 f[x]*g[x] >= 310



the problem is how should it be converted?

should I write

f[x]*g[x]-300 >=0



and plot it. or

(f[x]*g[x]/300)-1 >=0



since they give two different plots.

How should I know which one is correct?

here is an example;

x = 2 z^3;
y = 3 z;

z1 = x*y - 1313.49

z2 = ((y*x)/1313.49 - 1)
Plot[{z2, z1}, {z, -100, 100}]


• Can you share the plotting commands you used as well? Commented Dec 18, 2023 at 18:32
• the normal Plot. I'll edit an write an example.
– lia
Commented Dec 18, 2023 at 18:38
• You are plotting 2 different functions! If you have a region specified by an equation f1[z]>=0, the same region is specified byf2[z]= f1[z]/300>=0. Or in your case f1[z]= f[z] g[z]-300 and f2[z]= f[z] g[z]/300 - 1 Commented Dec 18, 2023 at 20:21
• so what should I do? @Daniel Huber I mean what is the correct way of plotting that inequality? equation 1 or equation 2
– lia
Commented Dec 18, 2023 at 20:29
• Plot the region, not the function. Commented Dec 18, 2023 at 20:41

There is still some symbol confusion in the question, so let me know if I misunderstood your aim. However, either form will give you the same result, of course. Let's set up your equations:

Clear[f, g, x, y, z]
f[z_] := 2 z^3
g[z_] := 3 z

eq1 = f[z] g[z] > 1313.49
eq2 = Simplify@DivideSides[SubtractSides[eq1, 1313.49], 1313.49]


We can solve each inequality in $z$ to find the feasible region:

Reduce[eq1, z]
(* Out: z < -3.84653 || z > 3.84653 *)

Reduce[eq2, z]
(* Out: z < -3.84653 || z > 3.84653 *)


As you can see, the two formulations are equivalent.

We can also plot the results using NumberLinePlot:

NumberLinePlot[eq1, {z, -10, 10}]
NumberLinePlot[eq2, {z, -10, 10}]


The output for both is identical:

For a Plot based approach, you could consider the following, where I first plot the left-hand side of the "natural" inequality $$f(z)\ g(z) >1313.49$$, and in the second I plot the left-hand side of the "modified" inequality $$\frac{f(z)\ g(z)}{1313.49}-1>0$$.

In the first case, we are looking for the values of $$z$$ for which the argument of Plot is at least equal to $$1313.49$$ and growing:

Plot[
f[z] g[z], {z, -5, 5},
Mesh -> {{1313.49}}, MeshFunctions -> {f[#] g[#] &},
MeshStyle -> Directive[PointSize[0.02], Red],
GridLines -> {None, {1313.49}}
]


In the second case, we are looking for the values of $$z$$ for which the argument of Plot is at least zero and going positive:

Plot[
(f[z] g[z])/1313.49 - 1, {z, -5, 5},
Mesh -> {{0}}, MeshFunctions -> {(f[#] g[#])/1313.49 - 1 &},
MeshStyle -> Directive[PointSize[0.02], Red]
]


• so actually for me the important thing is the region. as we can see the curve is basically the same, but the important thing is that it gives different values for the same x. that's confusing for me.
– lia
Commented Dec 18, 2023 at 20:28
• @lia The region only depends on the values of $x$, which are the same for the two curves. You can visualize the region using NumberLinePlot as shown in my answer. The fact that the $y$ thresholds are different for the two formulations of your equation is explained in my answer as well: in the first case, you are seeking the values of x for which a function is greater than 1313.49; in the second case, you are seeking the values of x in which a different but related function is greater than zero. Commented Dec 21, 2023 at 16:16
• Thanks for the explanation
– lia
Commented Dec 29, 2023 at 17:56