Study of f(x) = √(x + 2) − x, from the domain to the exact number of intersections.

I draw the root y = √(x + 2) and the line y = x in the same plane. At x = 2 they meet. At x = −1 the root is 1 and the line is −1. Why, if I square, does the calculation also offer −1? And what happens if, instead of looking for a zero, I ask f(x) = √(x + 2) − x to reach any level?

Mathematics Explorer compares the square root of x plus 2 with the line y equals x. The curves meet at x equals 2.
The comparison in Graphs. Left of zero the line has negative ordinates, while the root stays non-negative. The two ordinates become equal at x = 2.

The edge of the domain and the false zero

The root exists for x + 2 ≥ 0. The domain is [−2, +∞). The root and the linear term are continuous on this domain. At the edge, continuity is read from the right: f(−2) = 2 and the limit for x → −2+ is 2. On the vertical axis, where x = 0, I find (0, √2).

To look for the zero I isolate the root: √(x + 2) = x. The left side is non-negative, so before squaring I impose x ≥ 0. Under this condition, squaring is reversible and gives x² − x − 2 = (x − 2)(x + 1) = 0. What remains is x = 2, and indeed √4 − 2 = 0. The candidate −1 violates the initial condition. Substituting it gives f(−1) = 2.

For −2 ≤ x < 0, I add a non-negative root to a positive −x, and at 0 the value stays positive. For x ≥ 0 I can compare the squares of √(x + 2) and x directly. The difference x + 2 − x² = (2 − x)(x + 1) has the sign of 2 − x. The function is therefore positive on [−2, 2), zero at 2 and negative after 2.

A short climb and a bottomless descent

For x > −2 the derivatives are:

f′(x) = 1/(2√(x + 2)) − 1
f″(x) = −1/[4(x + 2)3/2]

The first derivative is positive for −2 < x < −7/4, zero at −7/4 and negative beyond. The function increases on [−2, −7/4] and decreases on [−7/4, +∞). The second derivative is always negative in the interior, so the curve is strictly concave also when the continuous edge is included. The edge point (−2, 2) is a local minimum relative to the domain. For s > 0 the difference quotient to the right of the edge is (√s − s)/s = 1/√s − 1. It tends to +∞: the right half-tangent is vertical, on the line x = −2.

At infinity √(x + 2)/x tends to 0, so f(x)/x tends to −1 and f(x) tends to −∞. The vertical distance from −x + b, for any fixed intercept b, is √(x + 2) − b and grows without bound. The limiting slope of the secant is −1. An oblique asymptote would also require a vertical distance that tends to zero. At the edge x = −2 the limit is finite.

One substitution solves every level

I switch to the variable t = √(x + 2). The conditions are t ≥ 0 and x = t² − 2. Each non-negative t corresponds to exactly one x of the domain, and vice versa. I rewrite the function and complete the square.

f(x) = 2 + t − t² = 9/4 − (t − 1/2)²

The global maximum is 9/4 and is reached for t = 1/2, that is x = −7/4. The branch to the right of the maximum is continuous and goes down towards −∞. The range is therefore (−∞, 9/4]. Now to solve f(x) = h I use t = (1 ± √(9 − 4h))/2, keep only the real, non-negative values and go back to x = t² − 2.

LevelAdmitted values of tDistinct solutions
h < 2√(9 − 4h) > 1. Only the + sign remains.One, on the decreasing branch.
h = 20 and 1.Two, −2 and −1. The first is at the edge.
2 < h < 9/4Two, both positive and distinct.Two, on either side of the maximum.
h = 9/41/2 from both signs.One, −7/4. The line is tangent.
h > 9/4The radicand 9 − 4h is negative.None.

At h = 35/16, I get t = 1/4 and 3/4, so x = −31/16 and −23/16. At h = 2, t = 0 or 1 and we are back to −2 and −1. If you prefer squaring directly √(x + 2) = x + h, the condition x + h ≥ 0 must be kept.

What Mathematics Explorer finds

Open a Session and choose Viewers → Mathematics → Graphs. Select the initial function, double-click the Main branch and write sqrt(x+2)-x in Expression. Keep the unit 1 and set [−2, 5] as global domain, with 701 samples and without excluding the edge. To rebuild the first figure, instead declare two functions with Add declaration… in the menu of the Functions list and enter sqrt(x+2) and x in their branches, on [−2, 4] with 601 samples. From Operations → Plot / Refresh I get the plot. In the Graphs selector I choose roots, then open Operations → Analyze and leave the study limits empty. The search reported x ≈ 1.99999999987 and a convergence or tolerance warning. I repeat choosing extrema first in the same selector. The search found the interior maximum near −1.74999999307, with ordinate 2.25. The summary of interior extrema leaves out the local minimum at the edge.

Analyze extrema shows the interior maximum near x minus 1.75, with ordinate 2.25.
The interior candidate from extrema. The exact value comes from completing the square.

I add three constant functions, with expressions 2, 35/16, 9/4. To see the short climb I narrow the global window to [−2, −1] with 401 samples. I refresh the plot and, if the view keeps the previous scale, double-click the plane to fit it to the traces. I select the root function and the intersections mode. I open Operations → Analyze and in the dialog indicate, one at a time, the constant function as the second operand. I leave the limits empty to study [−2, −1]. The search reported −2 and −1 for h = 2, −1.9375 and −1.4375 for 35/16, and −1.75 for 9/4. At these levels the points appeared as sampled candidates with zero residual. Raising the study minimum to −1.99 for h = 2, only −1 remained in the response. For the contact at the maximum the graph of f − 9/4 keeps the same sign on both sides. The search found it on the grid tried. The calculation in t certifies the number of solutions.

Building the gap from a level in Algebra

The calculation in t has already given me the two points at level 35/16. Can I directly build the function that measures the gap from that level? I tried with GX-TXT v0.9.8.10-dev-112-p012 with micropatch, Mathematics Explorer 0.2.0, on a copy for Debian 13 amd64. Installation and start-up instructions · Micropatch (ZIP).

I use two main branches with unit 1 on the closed domain [−2, −1]. With the product procedure I save the model and publish sqrt(x+2)-x as alg_radicale and 35/16 as alg_quota. In Algebra I load the root function in Operand A and the level in Operand B. I wait for each operand to be read, choose Subtract Functions, press Apply and open the result in View formula.

The expected gap is √(x + 2) − x − 35/16. It vanishes at −31/16 and −23/16 and is 1/16 at the maximum, at −7/4. I published the result as alg_radicale_meno_quota and read it back in Operand A. Evaluate samples… stayed inactive. An independent check of the saved definition returns 0, 1/16 and 0 at −31/16, −7/4 and −23/16 respectively. The number of solutions over the whole domain follows from the exact calculation in t.

When the official fix is included and verified, you will use the standard P013 for the exercises.

GX-TXT DEV112 P012, Mathematics Explorer 0.2.0. The path tested in Graphs returns numerical candidates. The exact solution of the levels here comes from the substitution. Check levels and solutions (ZIP).

Final exercise

On which interval is f(x) ≥ 17/8? Also try the level 17/8 as a constant function.

Worked solution

The square (t − 1/2)² must be ≤ 1/8. So t goes from 1/2 − √2/4 to 1/2 + √2/4, both positive. On this interval t² − 2 is increasing. The required set is [−13/8 − √2/4, −13/8 + √2/4]. The endpoints are included because the inequality admits equality.

Back to the project Eight studies with Mathematics Explorer

Other steps of this project

Leave a Reply

Your email address will not be published. Required fields are marked *