Posted: August 27th, 2009 | Author: zach | Filed under: Uncategorized | Comments Off
Math: Implicit Differentiation
Today I want to talk about a more basic Calculus trick called “implicit differentiation.” In a subsequent post, I’ll show you a slightly fancier version involving partial differential equations.
For this post, I assume you know how to take derivatives. If not, take a few hours and you’ll get the basic idea.
NOW THEN. It is often the case in math that you’ll encounter nice looking functions, such as the following:
y = e^x
y = sin(x)cos(x)
y = ln(sin(tan(tanh(x)))
Why do I call these “nice” functions? Because they have y stuff on one side and x stuff on the other side. That is, by making a change in the value of x (the independent variable, in this case), we can easily get the effect on y (the dependent variable, in this case).
Having functions of this form generally makes differentiation easy. The first you can do in your head, the second is simple use of the product rule, and the third you can solve with a list of derivatives and simple use of the chain rule.
But, what do you do if you have a function like this:
xy = sin(y) + (x^2)
There is not an obvious way to get all the y stuff on the left and all the x stuff on the right. Crap!
This is where we have to take an implicit differentiation. To understand how it works, you need to remember what exactly you’re doing when you take a derivative of a function.
Say you have the following:
y = (x^2)
Mentally, you probably say “to take the derivative, I put an apostrophe next to the y, move the exponent down, and reduce it by one, to obtain…”
y’ = 2x
But, what you actually did to that function was to say “how does an infinitesimally small bit of this function change as we change an infinitesimal bit of x?” Or, more formally, you applied a d/dx to each side. Laid out very explicitly, this is:
y = (x^2)
dy/dx = d(x^2)/dx
dy/dx = 2x
y’ = 2x
So, you see that the process of differentiation is relatively algebraic. You do the same thing to both sides and you get a new result.
Let’s now return to our less friendly equation.
xy = sin(y) + (x^2)
What happens if I apply a d/dx to everything here?
(d/dx)xy = (d/dx)sin(y) + (d/dx)(x^2)
(d/dx)xy = (d/dx)sin(y) + 2x
If you’ve never done implicit differentiation, that’s about as far as you’ll get. The other two terms just don’t make sense unless we change tactics.
Let’s look at sin(y). If we were taking (d/dy), this would simply change into cos(y). For (d/dx) it doesn’t make a great deal of sense. But, let’s remember the good old chain rule, which allows us to string together different derivatives. What if we said…
d/dx = dy/dx * d/dy
Now we’ve got a converter from d/dx to d/dy. All we have to do to make it work is multiply in a dy/dx, aka y’.
So, saying…
(d/dx)xy = (d/dx)sin(y) + 2x
Is the same as saying…
(d/dx)xy = (dy/dx)(d/dy)sin(y) + 2x
Which works out to…
(d/dx)xy = y’ * cos(y) + 2x.
You can see we’re now getting closer. All we have left to do is differentiate the leftmost term. To do so, we use the product rule, which says that (uv)’ = u’v + v’u.
So, we say d/dx(xy) = x’y + y’x.
Or, using our new technique…
(xy)’ = (dx/dx) * y + (y’) * (dy/dy) * x
The dx/dx and dy/dy clearly equal 1, which gives us the simple result…
(xy)’ = y + y’x
Substituting this back into our original derivative, we get…
y + y’ * x = y’ * cos(y) + 2x
And voila. You now how the derivative of our initial function xy = sin(y) + (x^2).
It’s always good to learn the underlying logic behind techniques such as this. However, once you’ve internalized that, the technique becomes quite simple. Because d/dx = y’ * d/dy, if you want to take the derivative of y, all you have to do is take a derivative as normal and multiply by y’.
In fact, every time you work with a simple function, such as y = x^3, you’ll do the same operation. You just don’t notice because d/dy of y is simply 1. So, all you have left is the y’.
That’s all for now! The next entry will probably be on the topic of partial differential equations. Woop!
Posted: August 25th, 2009 | Author: chason | Filed under: Off Topic | 4 Comments »
Unfortunately I have no specific topic today. I’ve been studying integrals in Calculus but because of movie making duties to SMBC Theater, I haven’t been able to make as much progress as I’d like. So instead, I’m going to talk a little about the learning process.
Since Zach encouraged me to jump back into math and science a couple months ago, I’ve been retraining my brain in the fine art of math. I’ve also been reading scientific papers and pages about advanced math. I don’t understand much of what I read, especially when the equations come out. But I find that engrossing myself with these ideas and topics that are so far above my head helps me understand the more basic math that I am studying, and as I do learn more I can find common themes between ideas that I might not have connected otherwise.
Often people at my day job are shocked or confused by my decision to study Calculus and Physics on my own. They ask if I’m going to college or taking courses but when I reply that I am doing it on my own, they are simply flabbergasted. My response is usually to equate studying mathematics and science to jogging, but for the brain. That same burn that you feel in your legs that hurts so good can happen in your brain as well.
Too many people see math and science (hard science, not the pop science that most people encounter) as subjects that are exclusive to school, when they have great value when studied as a hobby. I’d like to make it clear that I am not studying them as a hobby, but even if I did not have delusions of grandeur about becoming a scientist, I could see great value in immersing myself in these subjects.
I promise I’ll have a more substantive post later in the week!
Posted: August 17th, 2009 | Author: zach | Filed under: Math | 3 Comments »
Some background:
So, if you’ve had more than a couple days of calculus, you remember the basic idea of a limit. Essentially, a limit is the value a function approaches as the function moves toward some other value.
For example, the limit of f(x) = 1/x as x gets bigger and bigger is 0. If you want this proved visually, make a graph of the function. You’ll see that 1/x gets closer and closer to zero. Indeed, at infinite distance (”as x approaches infinity”) we can say 1/x goes to zero.
Although this can get more complex, the general principle is simple. Take a function, work it into a form for which the limit is apparent, find the limit.
Taking the next step:
But now, imagine you want the limit for a three dimensional function, such as limf(x,y) = (x^2+2y^2)/(x^2+y^2) as (x,y) —> (0,0).
For starters, let’s see what happens if we hold x at 0 while moving y to zero. That is, let’s ride the y axis toward 0. We quickly see that if x=0 and y approaches 0, the numerator of the limit ends up at 0.
You can readily see that riding the x axis will produce similar results. So, you may suspect that the limit is 0. But, what happens if we don’t ride an axis? What if we set up a relationship between x and y, such that x=y?
A different approach:
Checking for the limit (that is, turning each y into an x), we find we get (3x^2)/(2x^2), which ends up as 3/2.
Since we get 0 from one approach and 3/2 from another, we conclude that the function has no limit.
But what if you can’t find two different limits?
Imagine you have a limit for which you can’t find two different solutions. For example, limf(x,y) = x+y as (x,y)—>(0,0). We can walk the x or y axis like we did last time, and we find we get zero either way.
We can make x=y, but then we just get a function equal to 2x, which obviously approaches 0 as x approaches 0. You can even try weird stuff, like y=x^2, but you still end up with 0.
But can you prove it?
So, now we suspect the limit is 0. But we certainly can’t work out every possible approach. However, if we can prove that the function is continuous, then we know that we can take the limit anywhere and get the same result.
So, we set up two values: delta and epsilon.
Delta is some distance bigger than the distance between (x,y) and the limit being approached. Epsilon is some value greater than the numerical difference between f(x,y) and L.
If there is a real limit, for every value between 0 and delta, there should be a real value less than epsilon.
Now, let’s think about that physically, because it sounds more complicated than it is. Basically, all we’re saying is that, if there really is a limit, we can make the distance from (x,y) to the numbers it approaches as tiny as we like and still find a corresponding value for the difference between f(x,y) and L.
Another way to think of it comes from the history of the terms. Delta is used for “distance” and epsilon is used for “error.” That is, if you keep shrinking the distance between (x,y) and its limit, the difference between the functions value at (x,y) and the limit it approaches will get smaller and smaller. The closer we get to the limit, the smaller the error will be.
So, let’s go back to our limit of f(x,y) as (x,y) goes to (0,0). By the Pythagorean theorem, we know the distance between those two points is sqrt(x^2 + y^2). If the limit were (a,b) instead of (0,0), we would have to say sqrt((x-a)^2 + (y-b)^2). Either way, it’s fairly simple math that lets us say that whatever delta is, it’s greater than sqrt(x^2 + y^2). Since that value is by definition positive, we can say 0<sqrt(x^2 + y^2)<delta.
Now, let's get our epsilon. This one is pretty simple since we chose a simple function. Since we believe the function approaches 0, we simply say that f(x,y) – 0 is less than epsilon. That is, x+y<epsilon.
Now, if we can prove that for every delta there's an epsilon, we've proved that the theorem is continuous!
Because sqrt(x^2 + y^2) is the hypotenuse of a triangle, we know it's lower in value than x+y. But, arbitrarily, I can come up with a bigger delta by saying delta = 3epsilon. Now, no matter what, delta is bigger than epsilon.
So, we know delta is bigger than epsilon, and we also know that both of these functions have values at every point. Therefore, we know that no matter how small we take delta, there will always been an epsilon. Therefore we know that we have a continuous function. VICTORY.
Once we have a continuous function, by definition we can substitute the (0,0) in for the y and x. That gives us f(0,0) = 0 + 0. Unsurprisingly, the limit is zero.
In Conclusion
Sometimes calc can be a little hard on the brain, especially when you first encounter a new concept. Even more frustrating is the fact that you know the mathematics makes more sense than anything else in reality. If the above seems a bit difficult, it's really just a matter of politely mashing your face against it for a day or two.
I do plan on more succinct updates in the future.
<3,
Zach
Posted: August 17th, 2009 | Author: chason | Filed under: Math | 4 Comments »
One of the concepts I’m working on is determining what the min/max of an equation is and whether or not it is the min or the max. If you haven’t read Zach’s article yet, just know I am far behind him at this point.
So let me lay out the basic strategy for determining min/max. The derivative equation will solve for 0 when x is set to either a max or min. For example:
f(x) = x2 + 2x
f'(x) = 2x + 2
0 = 2x + 2
-1 = x
So when x = -1 then f(x) will be at either a max or min. This can be easily visualized by remembering that a derivative is nothing more than the measure of the slope of the tangent at a point on the graph. So the only points at which f'(x) = 0 will be where the line flattens to 0 slope, which will be the max or min.
Read the rest of this entry »
Posted: August 14th, 2009 | Author: chason | Filed under: Off Topic | Comments Off
Welcome to sBlog!
This is a new science oriented weblog created by me, Chason Chaffin, and Zach Weiner. We are childhood friends who majored in Photography and English Literature (respectively) in our initial college careers, but have had our childhood love of science rekindled and stoked in the last few years.
This blog will be a way for us to share our love of rationality and reason with the world, as well as a way for us to create a roadmap of our journey for ourselves and you.
Thanks for reading!