In my attempt to solve the bigger problem, I am still having some issues with Manipulate and FindRoot. I have used your suggestions above.I think I am close but I need some helping hand.
Here is another simplified version of my problem definition:
Remove["Global`*"];
A1 = .3265;
A2 = -1.07;
Manipulate[
Module[{func, z},
func[z_, zp_] := 1. + A1*zp + A2*zp^2 - z;
Evaluate[(2. + z0) /.
{z0 ->
Evaluate[
z /. FindRoot[{func[z, zp] == 0} /. {zp -> p1*100}, {z, 1}]]
}]
],
{{p1, 10, "P"}, 10, 20, 1, Appearance -> "Labeled",
ImageSize -> Small}
]
My objective is to solve a nonlinear equation 'func' that has a variable zp that needs to be manipulated by slider. The root of this equation 'func = 0' then gets used in the target variable '(2. + z0)' that I need to output within the Manipulate.
I am getting some errors related to the FindRoot as shown below. I would really appreciate some suggestion to modify the code to resolve these errors.
