Guessing the graphs of single variable functions
In calculus we learn that derivatives can help to plot the graphs of certain functions. However, sometimes we can use pure reasoning to have an idea of the graph without using a machine. The general idea is in fact relying on the very concept of a derivative. When you look at an equation and want to guess the graph without plotting it using a computer, what you have to do is to think about small variations in the function's argument. Do a mental exercise calculating the function for x = 0, x = 1, x = 2 and imagine how the function is increasing | decreasing for each unit that you add or subtract. Try to predict the function's behaviour for both very large and very small numbers. Even unknowingly to the definition of a derivative you are, in fact, using it.
To check the graphs for the examples use google, desmos, geogebra or wolfram to plot them online.
Before I progress. I'm making the assumption that you already know how to plot sines, cosines, parabolas, cubics, exponentials and logarithms.
Addition of functions
- [math]\displaystyle{ f(x) = \sin(x) + x^2 }[/math]
First we have that [math]\displaystyle{ -1 \leq \sin(x) \leq 1 }[/math]. On the other hand, the square has no boundaries, it can grow as much as it wants to. For any large angle in radians (remember that angles are real numbers) the square is going to produce a much larger number than the sine. For large numbers we conclude that the parabola is going to dominate the graph. We could stop here, but we still have an unsolved problem: what happens for small numbers? The lowest value for the wave is [math]\displaystyle{ \sin(3\pi/2) = -1 }[/math] and [math]\displaystyle{ (3\pi/2)^2 \gt 1 }[/math]. [math]\displaystyle{ \sin(\pi) = 0 }[/math] and [math]\displaystyle{ \pi^2 \gt 9 }[/math]. From those numbers we have a very rough impression that when we look at [math]\displaystyle{ |\sin(a) - \sin(b)| }[/math] and [math]\displaystyle{ (a - b)^2 }[/math], the latter should yield larger numbers than the former. From that we can estimate that the graph is going to be a parabola for small numbers too.
- [math]\displaystyle{ f(x) = \sin(x) + e^x }[/math]
This is interesting. For [math]\displaystyle{ x \lt 0 }[/math], we have [math]\displaystyle{ e^x \lt 1 }[/math] and as we keep going to even more negative [math]\displaystyle{ x }[/math], it keeps going closer to zero. In other words, we are adding smaller and smaller values of [math]\displaystyle{ e^x }[/math]. On the other hand, the sine wave keeps its regular oscillation between -1 and 1, meaning that the sine "wins" here. Now for [math]\displaystyle{ x \gt 0 }[/math] we see that the exponential grows at a rate that goes well beyond the sine's amplitude, which means that the exponential "wins" here. For [math]\displaystyle{ x \gt 0 }[/math] the exponential dominates the graph.
- [math]\displaystyle{ f(x) = e^x - x^2 }[/math]
This is pretty quick. For [math]\displaystyle{ x \lt 0 }[/math] the square "pulls down" the graph because the exponential is never going to be negative. For [math]\displaystyle{ x \gt 0 }[/math] the exponential grows so much faster, that the square is not "strong" enough to prevent the former from growing. How do we know that? One way is by memorizing the graphs of [math]\displaystyle{ x^2 }[/math] and [math]\displaystyle{ e^x }[/math]. The second way is to ask: which is larger [math]\displaystyle{ e^{10} }[/math] or [math]\displaystyle{ 10^2 }[/math]? Now we know that [math]\displaystyle{ 2 \lt e \lt 3 }[/math]. The third way is to compare rates of change.
- [math]\displaystyle{ f(x) = \sin(x) + \sin(2x) }[/math]
Within the domain of physics, to add one wave to another is called interference. The graph is a wave "contained" in another wave. In this case we have two patterns. There is an oscillation at regular intervals, but there is another oscillation with a different interval. Take one full turn at the unit circle, we are going to see that there is a regular wave and within that period there is another, higher frequency, wave in that same cycle.
- [math]\displaystyle{ f(x) = \sin(x) + x }[/math]
Consider the distance between the two functions, under the constrain of one oscillation for the sine, like this [math]\displaystyle{ |\sin(x) - x| = d }[/math]. We know that sine is a wave and the identity function is a straight line. What is going to happen to the distance as we increase or decrease the input variable? The sine outputs different values, but the identity always output the same value that we input. What's the conclusion then? That the distance between them keeps oscillating between two extremes. Then we have this scenario here [math]\displaystyle{ x + d \lt f(x) \lt x - d }[/math]. Conclusion? The graph of this function is a wave contained in between the straight lines [math]\displaystyle{ x + d = y_ 1 }[/math] and [math]\displaystyle{ x - d = y_2 }[/math].
The other way to solve this is complicated. Make a table for the values of [math]\displaystyle{ x }[/math], [math]\displaystyle{ \sin(x) }[/math] and [math]\displaystyle{ \sin(x) + x }[/math]. Choose the angles that are multiples of [math]\displaystyle{ \pi }[/math] radians. You are going to notice some patterns in that table. If you take increments in [math]\displaystyle{ x }[/math] with a constant rate, there is a pattern. The function seems to behave much like a straight line. However, if you take steps with no constant rate, you'll notice something different. The function behaves much like a wave. How can a function be a wave and a straight line at the same time? There is only one possible way for this to happen. A wave that is following the path of a straight line. See? Add a constant [math]\displaystyle{ c }[/math] to the wave, the graph moves up or down by that constant. The constant is nothing more than a constant function. What if we take that constant function and slant / rotate it so that it's still a straight line, but with an angle greater than zero? Then the wave is also going to be slanted / rotated too.
Think about the expression for [math]\displaystyle{ f(x) }[/math]. First, the [math]\displaystyle{ x }[/math], when compared to [math]\displaystyle{ x^2 }[/math] doesn't mess with the degree of the function. The [math]\displaystyle{ x }[/math] is not distorting the graph because it has a constant rate of change. We can take steps in constant increments and check that all that the [math]\displaystyle{ x }[/math] is doing there is moving the points of the graph up or down by some units. That should give us a very rough idea that the graph is going to be a wave, albeit no longer perfectly horizontal and parallel to the x axis. To put it in another perspective. If we squeeze the graph vertically, we are dampening the oscillations to the point that the wave becomes essentially flat with zero oscillations. In fact, there are cases where we do have something that follows an oscillatory pattern over time. However, the oscillation has such a small amplitude that we can disregard them and approximate it by a straight line.
Composite functions
- [math]\displaystyle{ f(x) = e^{\sin(x)} }[/math]
We have this situation here [math]\displaystyle{ e^{-1} \lt f(x) \lt e^1 }[/math] because the right and left extremes are, respectively, the highest and lowest values for the sine wave. In between we know that [math]\displaystyle{ x^0 = 1 }[/math] for all [math]\displaystyle{ x \neq 0 }[/math]. We also know that 1/e is a positive number. Therefore, the graph of this function must be a wave where [math]\displaystyle{ f(x) \gt 0 }[/math] for any [math]\displaystyle{ x }[/math]. A side note here: it's very hard to predict how smooth / abrupt the wave is going to be with just this mental exercise, we need more information and more calculations for that.
- [math]\displaystyle{ f(x) = \sin(e^x) }[/math]
This one is rather easy. What happens when [math]\displaystyle{ x }[/math] goes to negative? The exponential decreases and as we go closer to the negative infinity, the value of the function tends to zero. [math]\displaystyle{ \sin(0) = 0 }[/math], which means that for [math]\displaystyle{ x \lt 0 }[/math] the graph is decreasing in that direction. Now for [math]\displaystyle{ x \gt 0 }[/math] the exponential keeps increasing forever faster and faster. What is happening to the oscillation of the sine wave? It's oscillating even faster! As we move towards the positive infinity, the period of oscillation become so much closer to zero, that the wave is squeezed to the point of almost being a solid rectangle when we plot it.
- [math]\displaystyle{ f(x) = \sin(\sqrt{x}) }[/math]
The root doesn't accept negative numbers. This means that the graph won't exist for all [math]\displaystyle{ x \lt 0 }[/math]. Now for [math]\displaystyle{ x \gt 0 }[/math], the root keeps increasing, albeit slower than the identity function. We can already assume that the graph is going to be a wave, because for every [math]\displaystyle{ x \gt 0 }[/math] the sine is going to calculate something in between -1 and 1. We can stop here our analysis. If you want to go a bit further you can think about the parabola, which is the inverse of the square root. When we increase the input, the parabola grows even faster. The square root is the opposite. It keeps growing as well, except that for even larger inputs it's going to grow at even slower rates. Without the square root the period of oscillation is constant. The square root, however, takes the root of the number, which results in even longer periods of oscillation. In other words, we are stretching the wave along the x axis.
- [math]\displaystyle{ f(x) = \sqrt{\sin(x)} }[/math]
For [math]\displaystyle{ 0 \lt x \lt \pi }[/math] the sine produces positive numbers. On the other half of the unit circle, [math]\displaystyle{ \pi \lt x \lt 2 \pi }[/math], the sine produces negative numbers. On that interval the square root won't have a graph. There's going to be a gap in the function's graph. From here we can see that the graph is going to oscillate between 0 and 1. The shape of the graph is going to be a wave where we ignore all [math]\displaystyle{ f(x) \lt 0 }[/math] and for all [math]\displaystyle{ f(x) \gt 0 }[/math] it's a distorted sine wave.
- [math]\displaystyle{ f(x) = e^{-x^2} }[/math]
First, what happens for [math]\displaystyle{ x = 0 }[/math]? [math]\displaystyle{ f(0) = 1 }[/math]. We know that the function won't have any value above that. How? Because the argument of the exponential is an inverted parabola, which means that for any [math]\displaystyle{ x \gt 0 }[/math] or [math]\displaystyle{ x \lt 0 }[/math] the function won't ever go above that peak. Now [math]\displaystyle{ e^{-x^2} = 1/e^{x^2} }[/math], this means that when we approach [math]\displaystyle{ +\infty }[/math] or [math]\displaystyle{ -\infty }[/math] the function approaches zero. We know that this function cannot increase or decrease at constant rates, it must be somehow related to the parabola. What happens for [math]\displaystyle{ 1 \lt x \lt 0 }[/math]? We have fractions. In this case, we are taking the inverse of the root of [math]\displaystyle{ e }[/math]. What happens for [math]\displaystyle{ x \lt 0 }[/math] and [math]\displaystyle{ x \gt 0 }[/math]? We have that the square grows faster an faster. What do we know about the graphs of [math]\displaystyle{ \sqrt{x} }[/math] and [math]\displaystyle{ x^2 }[/math]? One is the inverse of the other. The root's rate of change decreases over time. The square is the opposite, its rate of change increases over time. This should give us the idea that the rate of change, somehow, inverts its sign somewhere in between infinity and the function's peak. What kind of shape relates to this behaviour? A wave, which can't be the case here. A combination of upwards and downwards parabolas, which also doesn't seem to work with that exponent. Or, something like an "S" shape, which is what happens here. This function is "bell shaped".
Product of functions
- [math]\displaystyle{ f(x) = x^2 \sin(x) }[/math]
This is very different from addition. Sine remains a wave, but the parabola is also part of this function's graph. How can a function be both a parabola and a wave at the same time? Is it something like [math]\displaystyle{ \sin(x) + x }[/math] with a wave following the path of a parabola? Not quite. It's much simpler than that. For every input, we are multiplying the wave by the square of that input. In other words, over time, we are increasing the wave's amplitude more and more. We aren't taking the square of the function's argument, which would make the sine oscillate at higher and higher frequencies. We are changing the sine's amplitude, making them greater and greater over time. A similar behaviour is observed with [math]\displaystyle{ e^x \sin(x) }[/math].
- [math]\displaystyle{ f(x) = x \sin(x) }[/math]
This is very similar to the previous, except that we are making the amplitude greater and greater at a constant rate. Not making the amplitude grow with the "speed" of a parabola.
- [math]\displaystyle{ f(x) = \frac{\sin(x)}{x} }[/math]
Now we are effectively dampening the wave over time. Rather than increasing the amplitude over time, we are decreasing it. This happens in both directions, to the right and to the left from the origin. However, what do we do about the origin? 0/0 is undefined, is the function increasing, decreasing or what? [math]\displaystyle{ 1/x }[/math] is undefined at the origin. If you know limits, [math]\displaystyle{ 1/x }[/math] goes to [math]\displaystyle{ +\infty }[/math] or [math]\displaystyle{ -\infty }[/math] depending on which side we take to approach the origin. We can't do [math]\displaystyle{ 0 \cdot \infty = 0 }[/math]. We can try to guess it. [math]\displaystyle{ \sin(\pi/2) = 1 }[/math]. If we take [math]\displaystyle{ \pi/2 }[/math] and divide by 10, [math]\displaystyle{ 0.1 \lt \sin(\pi/20) \lt 0.2 }[/math] with [math]\displaystyle{ 0.1 \lt \pi/20 \lt 0.2 }[/math]. With these results we have a pretty good idea that when we are close to 0°, the ratio [math]\displaystyle{ \sin(x)/x }[/math] seems to be approaching the constant 1. If that's the case, then at the origin, the function is not going to infinity up or down as the term [math]\displaystyle{ 1/x }[/math] would make us think.
- [math]\displaystyle{ f(x) = \log(x) \sin(x) }[/math]
Log increases over time. We are essentially increasing the wave's amplitude, but with a rate that is slower and slower over time. The opposite effect of multiplying by [math]\displaystyle{ x^2 }[/math] or [math]\displaystyle{ e^x }[/math]. For [math]\displaystyle{ x \leq 0 }[/math] the function is undefined because of the log.