Solveeit Logo

Question

Question: Solve for $x$: $x^2 + |x-1| = 1$...

Solve for xx: x2+x1=1x^2 + |x-1| = 1

Answer

The solutions are x=0,1x = 0, 1.

Explanation

Solution

The given equation is x2+x1=1x^2 + |x-1| = 1. To solve this equation, we consider the two cases based on the definition of the absolute value function x1|x-1|.

Case 1: x10x-1 \ge 0, which means x1x \ge 1. In this case, x1=x1|x-1| = x-1. The equation becomes: x2+(x1)=1x^2 + (x-1) = 1 x2+x1=1x^2 + x - 1 = 1 x2+x2=0x^2 + x - 2 = 0 This is a quadratic equation. We can factor it: (x+2)(x1)=0(x+2)(x-1) = 0 The possible solutions are x+2=0x+2=0 or x1=0x-1=0. This gives x=2x = -2 or x=1x = 1. We must check if these solutions satisfy the condition for this case, which is x1x \ge 1. For x=2x = -2, the condition x1x \ge 1 is not satisfied (since 2<1-2 < 1). So, x=2x = -2 is not a valid solution in this case. For x=1x = 1, the condition x1x \ge 1 is satisfied (since 111 \ge 1). So, x=1x = 1 is a valid solution.

Case 2: x1<0x-1 < 0, which means x<1x < 1. In this case, x1=(x1)=1x|x-1| = -(x-1) = 1-x. The equation becomes: x2+(1x)=1x^2 + (1-x) = 1 x2+1x=1x^2 + 1 - x = 1 x2x+11=0x^2 - x + 1 - 1 = 0 x2x=0x^2 - x = 0 This is a quadratic equation. We can factor out xx: x(x1)=0x(x-1) = 0 The possible solutions are x=0x=0 or x1=0x-1=0. This gives x=0x = 0 or x=1x = 1. We must check if these solutions satisfy the condition for this case, which is x<1x < 1. For x=0x = 0, the condition x<1x < 1 is satisfied (since 0<10 < 1). So, x=0x = 0 is a valid solution in this case. For x=1x = 1, the condition x<1x < 1 is not satisfied (since 111 \not< 1). So, x=1x = 1 is not a valid solution in this case.

Combining the valid solutions from both cases, we get x=1x=1 (from Case 1) and x=0x=0 (from Case 2). Thus, the solutions to the equation x2+x1=1x^2 + |x-1| = 1 are x=0x=0 and x=1x=1.

We can verify the solutions: For x=0x=0: 02+01=0+1=0+1=10^2 + |0-1| = 0 + |-1| = 0 + 1 = 1. (Correct) For x=1x=1: 12+11=1+0=1+0=11^2 + |1-1| = 1 + |0| = 1 + 0 = 1. (Correct)

Therefore, the solutions are x=0,1x = 0, 1.