Showing posts with label plug. Show all posts
Showing posts with label plug. Show all posts

Tuesday, June 3, 2008

Two Way Limits

It does not happen often, but when it does, it's simply beautiful: a question with two completely different yet right answers. I saw such question on Yahoo Answers today. Although I didn't answer it, the two different answers were so interesting and different in their approach, I had to bring it here.

The question is quite simple for people who know limits, but the two different answers are just amazing.

Find the limit:
limx -> 4 (3 - (5 + x)1/2) / (1 - (5 - x)1/2)

As you can clearly see, plugging x = 4 gives a zero in the denominator, which is why the question asks for a limit. You can plug in numbers and get a rough estimation, but we want a definite answer.

The first method is using L'Hopital's rule. This rule says that in order to find limx -> a f(x)/g(x), you can also find limx -> a f'(x)/g'(x). All we need now is to differentiate the numerator and denominator and see what we get:
limx -> 4 (-1/2 * (5 + x)-1/2) / (1/2 * (5 - x)-1/2)

The halves cancel, and by using the law that says an / bn = (a/b)n, we can show that:
limx -> 4 -((5 + x) / (5 - x))-1/2

Now plug in 4 and you will get -((5 + 4)/(5-4))-1/2
Which is -9-1/2 = -1/3

This is one very good solution, and most people who know calculus would choose that. However, there is another solution to this problem. To do that, multiply the numerator and denominator by the conjugate of the denominator:
limx -> 4 (3 - (5 + x)1/2) / (1 - (5 - x)1/2) * (1 + (5 - x)1/2) / (1 + (5 - x)1/2)

Using the law that says (a + b)(a - b) = a2 - b2 and the distributive property, we can conclude that:
limx -> 4 (3 - (5 + x)1/2) * (1 + (5 - x)1/2) / (1 - (5 - x))
limx -> 4 (3 - (5 + x)1/2) * (1 + (5 - x)1/2) / (x - 4)

Now multiply both parts of the fraction by the conjugate of the original numerator:
limx -> 4 (3 - (5 + x)1/2) * (1 + (5 - x)1/2) / (x - 4) * (3 + (5 + x)1/2) / (3 + (5 + x)1/2)
limx -> 4 (9 - (5 + x)) * (1 + (5 - x)1/2) / ((x - 4) * (3 + (5 + x)1/2))
limx -> 4 (4 - x) * (1 + (5 - x)1/2) / ((x - 4) * (3 + (5 + x)1/2) )

That is really nice. (4 - x) / (x - 4) = -1, so we can cancel out two terms and turn them into a nice little minus sign:
limx -> 4 -(1 + (5 - x)1/2) / (3 + (5 + x)1/2)

Now we can safely plug 4 for x and we get:
-(1 + (5 - 4)1/2) / (3 + (5 + 4)1/2)
-(1 + 11/2) / (3 + 91/2)
-(1 + 1) / (3 + 3)
-1/3

Again, we get -1/3 as an answer.

Math can be very easy if you think outside the box. Try doing it as often as you can.
Nadav

nadavs

Thursday, May 15, 2008

Cubic Funcion Discovery

Today I have another question from Yahoo Answers (super math tips people, send some questions too!). The question is simple, but its answer is very, very long.

There is a cubic function that passes through the following points: (-2, -24) (3, -4) (5, 18) (6, 56). Find out what the function is.

(The original question had a point different than (6,56), but it makes it shorter, so the fun is gone).

At first, it seems impossible. But then, you remember that a cubic function has the following form:
y = ax3 + bx2 + cx + d

We have x and y, so we can plug them in to find a, b, c, and d! All we have to do now is set up a system of four equations and solve them. All of them (here comes the long part):

I -8a + 4b - 2c + d = -24
II 27a + 9b + 3c + d = -4
III 125a + 25b + 5c + d = 18
IV 216a + 36b + 6c + d = 56

Now we need to get three equations out of those four. We do that be subtracting the equations from each other and getting rid of d. If done smart, it can even simplify the process in the future (if we can get small enough coefficient). There are six possible outcomes, and the smartest thing to do is to choose the best ones:

A. 91a + 11b + c = 38 (IV - III)
B. 98a + 16b + 2c = 22 (III - II)
C. 35a + 5b + 5c = 20 (II - I)

Now we need to eliminate another variable and create two equations. The chosen one is c. First, we multiply equation A by 2:
A2: 182a + 22b + 2c = 76
B2: 98a + 16b + 2c = 22

After we subtract the two equations we get:
84a + 6b = 54
Divide by 6 to simplify:
14a + b = 9

Now multiply equation A by 5:
A5: 455a + 55b + 5c = 190
C5: 35a + 5b + 5c = 20

Subtract them to get:
420a + 50b = 170
Divide by 10:
42a + 5b = 17

Now we have two more equations:
i. 42a + 5b = 17
ii. 14a + b = 9

Multiply equation ii by 5:
70a + 5b = 45

So now we have:
i21: 42a + 5b = 17
ii21: 70a + 5b = 45

Subtract the two equations:
28a = 28
a = 1

Now everything is going to be super fast. We just need to plug in the numbers we get, this time in equation ii (14a + b = 9):
14 * 1 + b = 9
14 + b = 9
b = -5

Another coefficient! They go down like flies! Now let's use equation A, since it has c with a coefficient of 1:
91a + 11b + c = 38
91 - 55 + c = 38
c = 2

So tiny, with so many problems. One coefficient to go, d, the y-intercept. Let's plug it in equation II, where all coefficients are positive but small:
27a + 9b + 3c + d = -4
27 - 45 + 6 + d = -4
d - 12 = -4
d = 8

THE END!

We now have all coefficients for this cubic function, and we can proudly say that it is:
y = x3 - 5x2 + 2x + 8

Who said cubics are hard?

Nadav


nadavs