How to optimize the integral using its limit as an optimization parameter

Hi everyone. I want to find the values of z0, and gamma1 at which the integral specified below has a minimum
value. The problem is in z0, it is one of the integral limits.The Integrand view is not critical, you can put
any expression you wish instead of it. I just want to know the way of solving the optimization problem when
one of the optimization parameters is one of the integral limits.
myfun = @(p,gamma1)((exp(p)-p-1)-(exp(p)-(1+p+p.*p./2))./(1+gamma1.*exp(-p)));
F = @(p) guadgk(@(p) myfun(p,gamma1),z0,100);
x0 = [0.0964,0.0277];
options = optimset('Display','iter','PlotFcns',@optimplotfval);
[x,fval,exitflag,output] = fminsearch(@(x)F(x(1),x(2)),x0,options);

Answers (0)

Asked:

on 18 Feb 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!