Turtles all the way

Calculus Level 4

Consider a function f ( x ) f(x) that satisfies

  • f ( x ) = 1 x + 1 x + 1 . . . f'(x) = \dfrac{1}{x + \dfrac{1}{x + \dfrac{1}{...}}} , and
  • f ( 0 ) = 0 f(0) = 0 .

What is all of the possible values of f ( 3 ) f(3) (to 2 decimal places)?

1.65 only -6.15 only 1.65 or 6.15 only None of the above

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

João Areias
Jul 4, 2018

Let g ( x ) = 1 x + 1 x + 1 . . . g = 1 x + g g 2 + x g 1 = 0 g(x) = \frac{1}{x+\frac{1}{x+\frac{1}{...}}} \Rightarrow g = \frac{1}{x+g} \Leftrightarrow g^2 + xg - 1 = 0 . So:

g 1 ( x ) = x + x 2 + 4 2 g_1(x) = \frac{-x+\sqrt{x^2 +4}}{2} and g 2 ( x ) = x x 2 + 4 2 g_2(x) = \frac{-x-\sqrt{x^2 +4}}{2}

We now need to determine if any of these solutions is an extraneous solution. In particular, (as pointed out by Leonel,) since g ( x ) g(x) must send positive values of x x to positive values of g ( x ) g(x) , so we have that g ( x ) = x + x 2 + 4 2 = f ( x ) g(x) = \frac{-x+\sqrt{x^2 +4}}{2} = f'(x) , now we can just solve it numericaly to get the answer. Here is my code for the numeric solution and the graph of f ( x ) f(x) :

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
import matplotlib.pyplot as plt
import numpy as np

def g(x):
    return (-x + np.sqrt(x**2 +4))/2

def f(x, x0, f0):
    n =  [x0]
    fn = [f0]

    step_size = 0.00001
    while not np.allclose(x, n[-1]):
        fn.append(fn[-1] + step_size*g(n[-1]))
        n.append(n[-1] + step_size)

    plt.plot(n, fn, label="f(x)")
    plt.legend()
    plt.show()
    return fn[-1]

print("%.2f" % f(3, 0, 0))

What? The second solution does not make sense. In the way the function is defined in the problem, the derivative always sends positive numbers to positive numbers, but your second solution sends them to negative numbers.

There is no "if", the derivative was defined and the quadratic equation gives you two possibilities, from which you must consider only one.

Leonel Castillo - 2 years, 11 months ago

Log in to reply

Sorry, remember seeing ages ago a video that presented an argument for which why you should take it into consideration both solutions and since my math wasn't so solid back then and I had just watched that numberphile video where they claim that 1 + 2 + 3... = 1 12 1+2+3... = \frac{-1}{12} that stuck with me and is what I thought when writing the question. But after reading your comment and Mark Hennings report I decided to go back to it to double check that and you are absolutely right, g 2 g_2 is not valid, that video made no sense and this question is wrong.

João Areias - 2 years, 11 months ago

Log in to reply

It's okay. I thought it was a cool problem.

The principle that can help you with this is to always know under what conditions problems are forced to have unique solutions, and then always check that whatever you obtained after lines of computation agrees with these criteria.

Leonel Castillo - 2 years, 11 months ago

To point out a common misconception that people make, if all that we have is "Equation A => Equation B", then all that we can conclude is "solution sets to Equation B is a superset of solution sets to Equation A". Thus, you still need to verify if g = f \int g = f is indeed a solution to the original equation.

The reason why most people are not aware of committing this error, is that a lot of equations that they deal with are equivalent to each other \Leftrightarrow . Typical cases when this doesn't happen are 1) Multiplying by a term which could be 0, 2) Squaring both sides of an equation. However, they only learn them as "Oh, this is a special case that must be considered and we have to test all values" instead of understanding them in the proper context of "These equations are not equivalent, so we might have extra solutions".

Calvin Lin Staff - 2 years, 11 months ago

Thanks for helping out people, I have also updated the solution now too

João Areias - 2 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...