I'd like to plot the maximum of a curve in function of a parameter. Meaning I looking for maxima that depend on a parameter.
Here is what I tried to do but FindMaximum is not parametric, so it did not work :
a=1/4
F[x_, y_, z_] = (1 + a*y)*x^2*z^2 - b*x*y
mux[x, y, z] = D[F[x, y, z], x]
muy[x, y, z] = D[F[x, y, z], y]
muz[x, y, z] = D[F[x, y, z], z]
MUx[x, y] = (mux[x, y, z] - muz[x, y, z]) /. z -> 1 - x - y
MUy[x, y] = (muy[x, y, z] - muz[x, y, z]) /. z -> 1 - x - y
Hxy[x, y] = D[MUx[x, y], y]
Hyx[x, y] = D[MUy[x, y], x]
Hxy[x, y] - Hyx[x, y]
Hyy[x, y] = D[MUy[x, y], y]
Hxx[x, y] = D[MUx[x, y], x]
matrice = {{x*(1 + x)*Hxx[x, y] + Hxy[x, y]*x*y,
x*(1 + x)*Hxy[x, y] + Hyy[x, y]*x*y}, {y*(1 + y)*Hxy[x, y] +
Hxx[x, y]*x*y, y*(1 + y)*Hyy[x, y] + Hxy[x, y]*x*y}}
Eig = Eigenvalues[matrice]
f1[b_] = FindMaximum[{Eig[[1]],
0 < x < 1 && 0 < y < 1 && x + y < 1}, {x, y}][[1]]
f2[b_] = FindMaximum[{Eig[[2]],
0 < x < 1 && 0 < y < 1 && x + y < 1}, {x, y}][[1]]
Plot[f1[b], {b, 0, 10}]
I thought about using ParametricNdsolve and the derivative at the maximum would be 0, but nothing tells me that they are 0. Meaning, given that I'm looking for a maximum that is in some interval, it could be that the maximum is at the border, where the derivative is not zero.
How could I proceed plz ?
f1[1]
. $\endgroup$