Domain sketch for multiple variables function

2 Ansichten (letzte 30 Tage)
Khoa Le
Khoa Le am 8 Aug. 2022
Kommentiert: Hassan am 15 Sep. 2024
How do I sketch the domain of the function f(x,y) =\dfrac{sqrt(y-x^2)}{(1-x^2)}
How to sketch domain D f(x,y)<=0 on Oxy?
This is for my exercise so I really need some help. Thanks in advanced!

Antworten (1)

Amith
Amith am 18 Aug. 2024
Hi Khoa,
You can make use of the example below to sketch the domain of the provided function:
% Define the range for x and y
x = linspace(-1, 1, 100); % 100 points between -1 and 1
y = linspace(4, 8, 100); % 100 points between 4 and 8
% Create a meshgrid of x and y values
[X, Y] = meshgrid(x, y);
% Calculate the function values
Z = sqrt(Y - X.^2) ./ (1 - X.^2);
% Handle the points where the function is undefined (x = 1 or x = -1)
Z(abs(X) == 1) = NaN;
% Plot the function
surf(X, Y, Z);
xlabel('x');
ylabel('y');
zlabel('f(x, y)');
title('Plot of f(x, y) = sqrt(y - x^2) / (1 - x^2)');
The resulting sketch would look something like this:
Hope this helps!

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by