A voir également:
- Max d'une fonction
- Fonction si et - Guide
- Driver max - Télécharger - Pilotes & Matériel
- I14 pro max - Accueil - Guide téléphones
- Max ou netflix - Accueil - Streaming
- Réinitialiser kidicom max - Forum Téléphones & tablettes Android
1 réponse
Voici la réponse à votre question.
---------------------------------------
function Unt
clc
clear all;
syms x
figure (1);
ezplot('x + log(x + 1) + (2^(1/2)*(x - (20*(x + 1)^(1/2)*(x + 4))/3 + 83/3))/10 - (2^(1/2)*(x/2 + 1/2))/5')
hold on;
axis([-1 1 -2 2])
df = myfunc; % compute f'(p)
t = -1:0.1:1;
dft = subs(df,{x},{t});
plot(t,dft,'r'); grid on; % plot the derivative ...
hold on;
root = fzero(@(x) 1/(x + 1) - ...
(2^(1/2)*((20*(x + 1)^(1/2))/3 + ...
(10*(x + 4))/(3*(x + 1)^(1/2)) - 1))/10 - 2^(1/2)/10 + 1, 1);
plot(root,0,'o','MarkerFaceColor','k') % plot x where f'(x) = 0
legend ('f(x)', 'df(x)', 'x where f(x) = max or ... df(x) = 0')
end
function df = myfunc(x)
%
% The initial function f(p)
% Compute the derivative of df(p) = f'(p)
%
syms x
f = x + log(x + 1) + ...
(2^(1/2)*(x - (20*(x + 1)^(1/2)*(x + ...
4))/3 + 83/3))/10 - (2^(1/2)*(x/2 + 1/2))/5;
df = diff(f,x);
end
---------------------------------------
function Unt
clc
clear all;
syms x
figure (1);
ezplot('x + log(x + 1) + (2^(1/2)*(x - (20*(x + 1)^(1/2)*(x + 4))/3 + 83/3))/10 - (2^(1/2)*(x/2 + 1/2))/5')
hold on;
axis([-1 1 -2 2])
df = myfunc; % compute f'(p)
t = -1:0.1:1;
dft = subs(df,{x},{t});
plot(t,dft,'r'); grid on; % plot the derivative ...
hold on;
root = fzero(@(x) 1/(x + 1) - ...
(2^(1/2)*((20*(x + 1)^(1/2))/3 + ...
(10*(x + 4))/(3*(x + 1)^(1/2)) - 1))/10 - 2^(1/2)/10 + 1, 1);
plot(root,0,'o','MarkerFaceColor','k') % plot x where f'(x) = 0
legend ('f(x)', 'df(x)', 'x where f(x) = max or ... df(x) = 0')
end
function df = myfunc(x)
%
% The initial function f(p)
% Compute the derivative of df(p) = f'(p)
%
syms x
f = x + log(x + 1) + ...
(2^(1/2)*(x - (20*(x + 1)^(1/2)*(x + ...
4))/3 + 83/3))/10 - (2^(1/2)*(x/2 + 1/2))/5;
df = diff(f,x);
end