Imaginando o gráfico de funções de várias variáveis
Se você entende a parábola, a linha reta, seno e cosseno, exponencial e logaritmo, já esta bom. A maioria dos gráficos de funções em 3D é uma combinação dos anteriores. Assim uma função pode ser uma onda numa direção e outra onda na outra direção. Uma parábola em uma direção e outra parábola na outra direção. São gráficos difíceis de traçar à mão e a maioria dos professores não pede para fazer à mão. O que aprendemos em cálculo é como aproveitar a geometria analítica e as curvas de nível para ter uma boa ideia de como os gráficos mais simples de funções de duas variáveis bom ser traçados.
Se você tem uma boa familiaridade com o deslocamento de gráficos de funções de uma variável para cima, para baixo e para os lados, é bastante natural imaginar o mesmo para funções de duas variáveis. Os casos mais fáceis são aqueles em que uma variável é constante, enquanto a outra é uma função já conhecida de uma variável. Multiplicar uma variável por uma constante deforma o gráfico da mesma maneira que uma função de uma variável seria, exceito que no caso de duas variáveis uma variável não dependa da outra. Assim a deformação pode ser assimétrica.
Para explicar porque somar uma variável com outra gera gráficos onde um eixo se comporta de maneira diferente do outro eixo é preciso entender o conceito de dependência linear da álgebra linear. Quando traçamos curvas pametrizadas no plano, X e Y são independentes uma da outra. Para o espaço 3D é o mesmo conceito. Em cálculo estudamos funções de uma ou mais variáveis mas elas não carregam nenhuma dependência entre si. Para traçar o gráfico de uma função de três variáveis precisaríamos de um espaço 4D, quatro eixos linearmente independentes. Porém não temos como fazê-lo. Se você traçar três eixos e adicionar um quarto, invariavelmente ele será dependende dos outros três. Alguns professores de cálculo mencionam a dependência linear, mas na maioria dos casos eles acabam omitindo isto.
Se você conseguir acompanhar este exemplo, todos os outros casos são apenas variações desta simples visualização. Observe como é uma parábola paralela ao eixo [math]\displaystyle{ x }[/math]. Nós deslocamos a parábola ao longo do eixo [math]\displaystyle{ y }[/math].
Para verificar os gráficos use o wolfram, geogebra, desmos ou google.
Função constante
- [math]\displaystyle{ f(x,y) = k }[/math]
Esta é a função mais fácil. Para cada par [math]\displaystyle{ (x,y) }[/math], a função assume o mesmo valor constante. É um plano paralelo ao plano XY.
Adição de funções
- [math]\displaystyle{ f(x,y) = x + y }[/math]
Este é análogo à função identidade em uma variável. Exceto que agora temos um plano, não apenas uma reta. Se multiplicarmos uma das variáveis por uma constante, estaremos mudando a inclinação naquela direção, mas não na outra.
- [math]\displaystyle{ f(x,y) = x^2 + y^2 }[/math]
Este é análogo a uma parábola. Exceto que agora temos duas parábolas. Duas como? Uma para cada eixo. Imagine uma parábola e daí rode | gire ao redor do seu próprio eixo vertical. O nome para esta figura é "parabolóide". Se alterarmos uma variável multiplicando-a por uma constante, o parabolóide perde a sua simetria. Se aumentarmos a potência de uma variável para 4, 6, etc. Estaremos "achatando" a parábola da mesma maneira que acontece com uma função de uma variável.
- [math]\displaystyle{ f(x,y) = x^2 + 0 }[/math]
Como a segunda variável é uma constante, temos uma parábola que é transladada ao longo de [math]\displaystyle{ y }[/math] numa taxa constante. Essencialmente, uma parábola na frente da outra em 3D. É uma espécie de "U" ou meio cano (não exatamente um "U" perfeito, atenção). Pense numa pista de snowboarding ou de skate. Com este mesmo raciocínio podemos explicar os gráficos do log, exp e ondas onde a segunda variável é uma constante.
- [math]\displaystyle{ f(x,y) = \sin(x) + y }[/math]
This is very similar to [math]\displaystyle{ \sin(x) + x }[/math], except that one variable is not "affecting" the other. Along [math]\displaystyle{ x }[/math] it's a sine wave. Along [math]\displaystyle{ y }[/math] is the identity function. In the previous example all parabolas were at the same "height". Now each wave is not at the same "height" but at some [math]\displaystyle{ y }[/math] units up or down. One way to visualise it is to think on roof tiles. There is a wave pattern but at the same time it's not parallel to the ground, it has a slope.
- [math]\displaystyle{ f(x,y) = \sin(x) + y^2 }[/math]
Very similar to the previous, except that the [math]\displaystyle{ y }[/math] axis is "bent" and is now a parabola. Unlike the case of [math]\displaystyle{ \sin(x) + x^2 }[/math] in which the power of two "wins" over the wave. With two variables the parabola can "coexist" with the wave because they are in different axis. There is no linear dependency between each variable.
- [math]\displaystyle{ f(x,y) = \sin(x) + \sin(y) }[/math]
We have waves with the same period on both directions. Whenever [math]\displaystyle{ \sin(x) }[/math] is minimum, [math]\displaystyle{ \sin(y) }[/math] is too. And the same for maximum.
Product of functions
- [math]\displaystyle{ f(x,y) = xy }[/math]
At first glance this may appear a flat surface, but it's not. It's not a linear function at all. Think about the identity function, each ordered pair is [math]\displaystyle{ x = y }[/math]. What happens if they are equal to each other and we are calculating the product of them? Then we have [math]\displaystyle{ x^2 }[/math] or [math]\displaystyle{ y^2 }[/math]. This means that along the diagonals this function is a parabola. Now comes the question: a parabola upwards or downwards? It depends on the product [math]\displaystyle{ xy }[/math]. As we know from the Cartesian plane, some of the pairs are going to have both variables within the positive range. Some are going to have one positive and the other negative, in which case the parabola is inverted. It's hard to put on words, but in one direction and at a certain angle it's a parabola upwards, in the other direction and at a certain angle it's a parabola downwards. Try this imagination exercise: pick up a square made of a very flexible material. Take two vertexes opposite to each other and pull them up. The other two vertexes, pull them down.
- [math]\displaystyle{ f(x,y) = (xy)^2 }[/math]
This graph is very similar to the previous with one difference: it won't assume any negative values. This means that we have two axis behaving as parabolas upwards. Apply [math]\displaystyle{ x = 1 }[/math] and we have a parabola parallel to the [math]\displaystyle{ y }[/math] axis. Apply [math]\displaystyle{ y = 1 }[/math] and we have a parabola parallel to the [math]\displaystyle{ x }[/math] axis. Where does the function grow faster? When [math]\displaystyle{ |x| = |y| }[/math]. That is, along the diagonals. Along both axis this function is always zero.
Now, can you guess the graph of [math]\displaystyle{ f(x,y) = (2 - x^2)(2 - y^2) \ ? }[/math] It's almost the same as before, but it's not longer zero at [math]\displaystyle{ (0,0) }[/math]. The negative signs can trick us into thinking that the parabolas are downwards. But we have this [math]\displaystyle{ {x^2}{y^2} \gt x^2 }[/math] and [math]\displaystyle{ {x^2}{y^2} \gt y^2 }[/math] for all [math]\displaystyle{ x,y \gt 1 }[/math]. What happens at [math]\displaystyle{ (100, 0) }[/math] and [math]\displaystyle{ (0,100) \ ? }[/math] Along the axes the graph is no longer always zero, it's going down.
- [math]\displaystyle{ f(x,y) = \frac{1}{x^2 + y^2} }[/math]
At first glance this function does resemble [math]\displaystyle{ 1/x^2 }[/math]. We are right here, the shape of this graph does resemble its single variable counterpart. If we choose one variable as a null constant, the function's graph is reduced to a single variable problem. It's symmetric in both directions. We can take an educated guess here and compare it to the paraboloid. In the paraboloid's case we take one parabola and spin it around its own vertical axis. We can do the same here and spin | revolve [math]\displaystyle{ 1/x^2 }[/math] around its own vertical axis to get an idea of this graph. The shape is going to resemble a water vortex flipped upside down.
- [math]\displaystyle{ f(x,y) = \frac{1}{(x + y)^2} }[/math]
It bears some resemblance to the previous, but without spinning | revolving the graph. Every sum [math]\displaystyle{ x + y }[/math] is going to be squared and as such, this function never assumes negative values too. What happens when the sum is [math]\displaystyle{ 0 \lt |x + y| \lt 1 \ ? }[/math] We have fractions such as [math]\displaystyle{ 1/10 }[/math] and to calculate the inverse of that means that [math]\displaystyle{ f(x,y) }[/math] grows towards infinity for such points. When we make [math]\displaystyle{ x = 0 }[/math], [math]\displaystyle{ y }[/math] is close to 1 but not equal to 1. Do the same for the other way around, [math]\displaystyle{ y = 0 }[/math] and [math]\displaystyle{ x }[/math] very close to 1. We can subtract small quantities from one variable and add them to the other while keeping the sum of both under 1 and above 0. This should give us the idea that the division by zero occurs over a straight line, specifically the line that passes through the points [math]\displaystyle{ (0,1) }[/math] and [math]\displaystyle{ 1,0 }[/math] of this function's domain.
Composite functions
- [math]\displaystyle{ f(x,y) = \sin(x + y) }[/math]
Don't be fooled thinking that to sum arguments is the same as to sum functions! For composite functions in two variables it's a little tricky to get the idea of the graph. The first thing to notice is that we have one sine function, not two as in [math]\displaystyle{ \sin(x) + \sin(y) }[/math]. This should give us the idea that there only one wave pattern in a single direction, no interference with waves in any other direction. The second thing to notice is that the angle is going to be a sum of two parts. How many pairs [math]\displaystyle{ (x,y) }[/math] result in, say, [math]\displaystyle{ \pi/2 \ ? }[/math] There are infinitely many combinations that add up to the right angle. This should give us the idea that, for every angle, there are infinitely many pairs. With that idea in mind we can think that each "height" of the sine wave is going to be constant along a straight line over this function's domain. This is exactly the idea of this graph, a series of waves propagating in a single direction without "spreading" over time in circular patterns. Think about waves parallel to the shoreline.
- [math]\displaystyle{ f(x,y) = \sin(x^2 + y^2) }[/math]
If you are quick to notice it we have what seems to be the equation of a circle as the sine's argument. We have that [math]\displaystyle{ \theta = (x^2 + y^2) }[/math]. With this we can already say that this sine wave is propagating in all directions in a circular pattern. The same pattern of throwing a stone on a lake, except that this function's graph keeps its ripples over long distances from the origin. Multiply the function by a decreasing function, in all directions, and we effectively dampen the oscillations.
- [math]\displaystyle{ f(x,y) = \sin(xy) }[/math]
Knowing the graph of [math]\displaystyle{ f(x,y) = xy }[/math] helps here. Along the axes the function is zero and [math]\displaystyle{ \sin(0) = 0 }[/math]. With the product [math]\displaystyle{ xy }[/math] the waves are neither circular nor straight as the previous two examples. To keep the angle a constant what should happen to the product [math]\displaystyle{ xy \ ? }[/math]. One variable should be the inverse of the other. This reminds us of this single variable function [math]\displaystyle{ f(x) = 1/x }[/math]. With that we can take an educated guess and say that the waves are propagating in all directions in a fashion similar to [math]\displaystyle{ 1/x }[/math] and [math]\displaystyle{ -1/x }[/math]. That is, along the curves of the inverse of [math]\displaystyle{ x }[/math] the sine is a constant.
- [math]\displaystyle{ f(x,y) = e^{-x^2 - y^2} }[/math]
If you know the graph of [math]\displaystyle{ e^{-x^2} }[/math] the graph of the two variable version should come naturally. It's symmetric in both directions. Remember that [math]\displaystyle{ e^{-x^2 - y^2} = e^{-x^2} \cdot e^{-y^2} }[/math]. If you look at [math]\displaystyle{ -x^2 - y^2 }[/math] it does resemble the equation of a circle. That means that for every [math]\displaystyle{ e^n }[/math] there are infinitely many pairs [math]\displaystyle{ (x,y) }[/math] that satisfy that number. The number being the distance from the origin. The graph resembles a hill.
- [math]\displaystyle{ f(x,y) = \ln(x^2 + y^2) }[/math]
The first thing to notice is that the argument cannot be zero. Again, [math]\displaystyle{ x^2 + y^2 }[/math] does remind us of the circle. The domain of this function is [math]\displaystyle{ x^2 + y^2 \gt 0 }[/math]. The graph of [math]\displaystyle{ f(x) = \ln(x^2) }[/math] is very similar to the graph of [math]\displaystyle{ f(x) = \ln(x) }[/math] except that the square root allows it to be plotted for negative inputs. With this in mind we can safely assume that the graph is symmetric in both directions. It resembles those illustrations that depict how a black hole distorts space-time.