0
$\begingroup$

I have this problem. I want to show the unassessed form of the equations that I enter in the graph, however, every equation that I introduce results in the substitution of the known values within the equation.

a*x^2 + 2*y + 1 -> 5*x^2 + 2*y + 1 

where a = 5

Manipulate[a = 5;
           Grid[
                {
                 {TraditionalForm[u]},
                 {"Equation", Row[{u, " = 0"}]},
                 {Plot3D[u, {x, -5, 5}, {y, -5, 5}]}
                }, Alignment -> Left],
           {{u, a*x^2 + 2*y + 1, "Equation"}}, 
           BaseStyle -> Directive[FontSize -> 16, FontFamily -> "Optima"]]

I have tried with {"Equation", Row[{HoldForm[u], " = 0"}]}, but it did not work.

$\endgroup$
  • $\begingroup$ But it will only work for that case and not for any other equation that you write when you run the Manipulate. $\endgroup$ – Tomás Valencia May 21 at 3:59
2
$\begingroup$

Here is a workaround:

Clear[a]
Manipulate[
 aa = 5;
 Grid[{{TraditionalForm[u]}, {"Equation", Row[{u, " = 0"}]}, 
       {Plot3D[u /. a -> aa, {x, -5, 5}, {y, -5, 5}]}}, 
        Alignment -> Left], 
 {{u, a*x^2 + 2*y + 1, "Equation"}}, 
 BaseStyle -> Directive[FontSize -> 16, FontFamily -> "Optima"]]

enter image description here

$\endgroup$
  • $\begingroup$ Works correctly. A suitable solution. $\endgroup$ – Tomás Valencia May 21 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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