Domain sketch for multiple variables function

2 次查看(过去 30 天)
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!

回答(1 个)

Amith
Amith 2024-8-18
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!

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by