Question: calculate the local maximum of a procedure

How do I calculate the maximum value of a procedure within a defined region. I want to calculate the maximum value of the procedure p for Ia_IaLGmax=0..2, Ua_Ue=0..1. How can this be done in maple?



restart;
with(plots):
Ue:=75;
L:=5*10^(-6);
f:=80*10^3;
T:=1/f;
factor:=1000;
E_con:=1/2*L*(Ia_IaLGmax*Ue/(8*L)*T+1/2*Ua_Ue*Ue/L*(1-Ua_Ue)*T)^2;
E_dis:=1/2*L*((Ue-Ua_Ue*Ue)/L*(1/2/(Ua_Ue-1)*(-(Ua_Ue-1)*Ua_Ue*Ia_IaLGmax)^(1/2))*T)^2;
helpvariable:=Ua_Ue=(Ua_Ue)^2/((Ua_Ue)^2+1/4*Ia_IaLGmax);
boundary:=solve(helpvariable, Ia_IaLGmax);
p:=proc(Ia_IaLGmax,Ua_Ue)
if Ia_IaLGmax<=(-4*Ua_Ue^2+4*Ua_Ue) then factor*1/2*L*((Ue-Ua_Ue*Ue)/L*(1/2/(Ua_Ue-1)*(-(Ua_Ue-1)*Ua_Ue*Ia_IaLGmax)^(1/2))*T)^2 else factor*1/2*L*(Ia_IaLGmax*Ue/(8*L)*T+1/2*Ua_Ue*Ue/L*(1-Ua_Ue)*T)^2 end if end proc;
eval(p);

Please Wait...