Finding the maxima/minima
    5 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Ikenna Iwudike
 el 2 de Abr. de 2022
  
    
    
    
    
    Respondida: Walter Roberson
      
      
 el 2 de Abr. de 2022
            f(x, y) = e^x − sin (y) on the ellipse g(x, y) = x^2 + 3*y^2 = 1
I was told to parametrize the ellipse by x = cos(t), y = (1/sqrt(3))*sin(t),  Substitute it into the formula for f , get a function of the single variable t and find its maximum and minimum on the interval [0, 2π] using fminbnd. I was able to find the minimum but I'm having trouble finding the maximum. Here's what I have so far:
syms t
x = cos(t);
y = (1/sqrt(3))*sin(t);
f = exp(x) - sin(y);
f = @(t) exp(cos(t)) - sin((3^(1/2)*sin(t))/3);
tmin = fminbnd(f,0,2*pi)
fmin = exp(cos(tmin)) - sin((3^(1/2)*sin(tmin))/3)
0 comentarios
Respuesta aceptada
  Walter Roberson
      
      
 el 2 de Abr. de 2022
        [tmin, fmin] = fminbnd(f,0,2*pi)
nf = @(x)-f(x);
[tmax, fmax] = fminbnd(nf,0,2*pi)
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Calculus en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

