Transformações de gráficos de funções

From Applied Science
Revision as of 01:59, 4 August 2022 by Wikiadmin (talk | contribs) (Created page with "Dependendo de como você aprendeu ''(ou pior ainda, não aprendeu nada!!)'' funções na escola, os gráficos podem ser um grande desafio a ser superado. Quando resolvemos equações estamos fazendo contas aritméticas básicas e, na maior parte do tempo, sem pensar no gráfico. Unindo a visualização gráfica com operações aritméticas simples conseguimos uma interpretação mais completa dos problemas. Os livros que eu conheço não trazem muitas explicações a re...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Dependendo de como você aprendeu (ou pior ainda, não aprendeu nada!!) funções na escola, os gráficos podem ser um grande desafio a ser superado. Quando resolvemos equações estamos fazendo contas aritméticas básicas e, na maior parte do tempo, sem pensar no gráfico. Unindo a visualização gráfica com operações aritméticas simples conseguimos uma interpretação mais completa dos problemas.

Os livros que eu conheço não trazem muitas explicações a respeito da translação de funções. Eles somente listam as propriedades, dão exemplos, mas não aprofundam. Eu achei que o conceito de função composta ajudaria a evitar confusões com o sinal de menos em alguns casos.

Em alguns trechos eu menciono a álgebra linear porque tem conceitos da álgebra linear que ajudam a entender o que acontece com funções quando transformamos seus respectivos gráficos com algumas operações. Os professores de cálculo frequentemente mencionam que multiplicar uma função por uma constante é uma "operação ou transformação linear" sem dar maiores explicações. Linear diz respeito à deformação do gráfico ser constante. O gráfico não é "destruído" no sentido de perder o seu formato original, como curvas sendo esticadas ou retas dobradas por exemplo. Não-linear diz respeito a um fator de deformação que não é constante. O gráfico perde a sua forma original, com perda das suas proporções originais.

Transladando o gráfico para cima / baixo



(Sem escala)
Pegue a função [math]\displaystyle{ f(x) = x^2 }[/math] por exemplo. Queremos que o gráfico suba. Como fazê-lo? Adicionando [math]\displaystyle{ n }[/math] unidades para a função. Adicionar [math]\displaystyle{ n }[/math] unidades significa que, para cada [math]\displaystyle{ x^2 }[/math], queremos isto [math]\displaystyle{ x^2 + n }[/math].

Não alteramos a curvatura do gráfico e nem o contradomínio da função. O que fizemos foi deslocar todos os valores de [math]\displaystyle{ y }[/math] por [math]\displaystyle{ n }[/math] unidades. O que de fato foi alterado é a imagem da função. Para duas variáveis é a mesma ideia.

Troque a adição por subtração e deslocamos o gráfico para baixo.

Refletindo o gráfico na vertical



(Sem escala)
Se multiplicarmos todo [math]\displaystyle{ f(x) }[/math] por -1, a função é virada de cabeça para baixo. Os pontos de [math]\displaystyle{ f }[/math] que forem negativos são refletidos para valores positivos e vice-versa. Quando uma função é composta (inserida) num módulo, todo valor negativo de [math]\displaystyle{ f }[/math] é refletido para um positivo. É por isto que os gráficos exibem um comportamento "espelhado" quando há um módulo. Para duas variáveis, multiplicar [math]\displaystyle{ f(x,y) }[/math] por -1 tem o mesmo efeito do caso de uma variável.

Deformando o gráfico



(Not to scale)
Now what about deforming the graph? We want to stretch / squeeze / shrink / enlarge it. Let's multiply the function by [math]\displaystyle{ n }[/math]. What's the difference between [math]\displaystyle{ nf(x) }[/math] and [math]\displaystyle{ f(nx) \ ? }[/math] In the first case we are making the function grow faster, [math]\displaystyle{ nf(x) \gt f(x) }[/math] for all [math]\displaystyle{ n \gt 1 }[/math] and all [math]\displaystyle{ f(x) \gt 0 }[/math] (careful with the conditions!). In the second case (careful with [math]\displaystyle{ nx^2 \neq (nx)^2 }[/math]!) we are also making the function grow faster, but at the same time we are messing with its argument as well.

What happens if [math]\displaystyle{ 0 \lt n \lt 1 ? }[/math] For [math]\displaystyle{ \frac{1}{2}f(x) = \frac{1}{2}(x^2) }[/math] we are "slowing down" the speed at which the function grows. For [math]\displaystyle{ f \left(\frac{1}{2}x \right) = \left(\frac{1}{2}x \right)^2 }[/math] we are also decreasing the function's growth rate. Unfortunately I can't show an animation here, but as the constant gets closer to zero, we are "flattening" the parabola. When the sign inverts, the graph also inverts.

For two variables we can deform the graph along one variable or both at the same time. However, to multiply the function by a constant is going to multiply both variables at the same time in this case. Remember, the [math]\displaystyle{ z }[/math] is dependant on each pair [math]\displaystyle{ (x,y) }[/math].

Note: in cases where [math]\displaystyle{ nf(x) = f(nx) }[/math] is true, this is one of the properties of a linear transformation in linear algebra. For two or more variables there is something called homogeneous function that I'm not going to discuss in this page.

Reflecting the graph horizontally



(Not to scale)
When a function is even this operation does nothing to it. That's why for this example I'm using [math]\displaystyle{ f(x) = x^3 }[/math]. When the power is odd, parenthesis doesn't change the sign. But when the power is even, it does avoid the confusion [math]\displaystyle{ (-x)^2 \neq -x^2 }[/math]. To avoid confusion because of the minus sign I'm going to use a composite function.

[math]\displaystyle{ g(x) = -x }[/math] is a function that does nothing more than to invert the sign of each number. It multiplies each number we apply to it by -1.

[math]\displaystyle{ f(g(x)) = x^3 }[/math]. It's a cubic that was spin | rotated around the vertical axis. For each positive number that we input. First [math]\displaystyle{ g(x) }[/math] inverts its sign, then [math]\displaystyle{ f(x) }[/math] calculates the cube of it. In this specific case, to compose the other way around with [math]\displaystyle{ f(x) }[/math] first, yields the same result.

When a function is spin | rotated around the vertical axis, there is a "hidden" composite function performing the operation that is to invert the sign of each and every argument.

For two variables it's more complicated. We can invert the sign of one of the variables independently from the other or invert both at the same time.

Note: you may have noticed an interesting fact. When we take an odd function and mirror it, it remains an odd function. When we take an even function and mirror it, it remains an even function. Graphically, it's all due to the fact that the functions themselves are already symmetrical in respect to one axis.

Translating the graph sideways

The first way to explain this is pretty simple. What we want to achieve is this: for each step [math]\displaystyle{ n }[/math] we take in [math]\displaystyle{ x }[/math] to the right, we want each and every point of the graph to move accordingly and not move any units up or down, nor increase or decrease the distance between them. Suppose we use [math]\displaystyle{ n = 1 }[/math]. We calculate [math]\displaystyle{ f(1), \ f(2), \ f(3), \ ... }[/math]. At the horizontal axis we are moving to the right at a constant rate of 1. At the vertical axis, however, each image is moving upwards because we are calculating [math]\displaystyle{ x^2 }[/math]. Hence, we want [math]\displaystyle{ f(1), \ f(2), \ f(3), \ ... }[/math] to not change their respective images before and after moving to the right. How do we "fix" that? We do the opposite, subtract 1 from the function's argument so that each and every image remains at their original heights. In other words [math]\displaystyle{ f(1 - 1), \ f(2 - 2), \ f(3 - 3), \ ... }[/math]. Therefore, to move the function's graph to the right by [math]\displaystyle{ n }[/math] units we change the argument to [math]\displaystyle{ (x - n) }[/math]. The same reasoning to move the function to the left, with the difference of a "+" sign.


(the graph is not to scale because it was hand draw)

[math]\displaystyle{ g_2(x) }[/math]. I used the index to differentiate the function from before and after the translation.

The second way to explain this involves rates of change and composite functions. Use the identity function, overlap it with the parabola. They intersect at the origin and at [math]\displaystyle{ n = n^2 = 1 }[/math]. See that right triangle formed with the points origin, [math]\displaystyle{ f(n) = g(n) }[/math] and [math]\displaystyle{ n \ ? }[/math] Now move the functions to the right. That triangle remains intact, which means that we didn't change the rate of change of any of the two functions. The root of both functions, however, did change from [math]\displaystyle{ f(0) = g(0) = 0 }[/math] to a new position at [math]\displaystyle{ n }[/math]. Now the rate of change of the identity function being constant means that [math]\displaystyle{ g(x \pm n) = x \pm n }[/math]. When we move it down by [math]\displaystyle{ n }[/math] units, its root also moves to the right by the same [math]\displaystyle{ n }[/math] distance. What's the function that passes through the points [math]\displaystyle{ (0, \ -n) }[/math] and [math]\displaystyle{ (0, \ n) \ ? }[/math]. It's [math]\displaystyle{ g_2(x) = x - n }[/math]. For the parabola's vertex to coincide with the root of [math]\displaystyle{ g_2 }[/math] we have that [math]\displaystyle{ f_2(g_2(x)) = (x - n)^2 }[/math]. We want both the parabola and the straight line to have a height of zero there. That's a graphical way to understand composite functions.

Moving odd or even functions around

[math]\displaystyle{ \ \ \ f(x) = f(-x) }[/math]. Even function.

[math]\displaystyle{ -f(x) = f(-x) }[/math]. Odd function.

Both odd and even functions are symmetric, but that fact alone is not what makes them odd or even!

An even function remains even if you multiply it by a constant. The same is true for odd functions. Think about it. The constant factor deforms the function, but it does preserve the symmetry in respect to the vertical and horizontal axes.

To move a function up or down may or may not preserve the fact that the function is odd or even. See how the points of the parabola behave as we move the graph up or down. It's easy to see that it remains an even function. On the other hand, the identity function loses the property of being odd if we do that.

Moving the function to the right or to the left does preserve the function's symmetry and overall shape, but the function is no longer odd nor even. Think about it. If we move a parabola sideways, we didn't change its shape. However, we messed with its argument. Take two points, [math]\displaystyle{ a \neq b }[/math], such that [math]\displaystyle{ f(a) = f(b) }[/math]. After the function is moved sideways, we no longer have [math]\displaystyle{ |a - 0| = |b - 0| }[/math]. The same happens with odd functions. That is, the distance between the two arguments is preserved when the function is moved sideways. On the other hand, the distance between each argument and the origin is now different from each other.