A19-SolvingSquareRootEquats.mws

High School Modules > Algebra by Gregory A. Moore

     Solving Squareroot Equations


Solving equations with squareroots requires additional steps and the need to check answers.

[Directions : Execute the Code Resource section first. Although there will be no output immediately, these definitions are used later in this worksheet.]

0. Code

>    restart; with(plots):

Warning, the name changecoords has been redefined

>    AddBothSides  :=  proc( expr, a )
    lhs(expr) + a = rhs( expr) + a;
 end proc:

>    MultBothSides  :=  proc( expr, a )
    simplify(lhs(expr) * a) = simplify( rhs( expr) * a) ;
 end proc:

>    SimplifyBothSides := proc( expr )
    simplify( expand( lhs(expr) )) = simplify( expand( rhs(expr) ));
end proc:

>    FactorBothSides := proc( expr )
    factor( lhs(expr) ) = factor( rhs(expr) );
end proc:

>    SquareBothSides := proc( expr )
    simplify( lhs(expr)^2 ) = simplify( rhs(expr)^2 );
end proc:

1. Example 1 : Solving Equations With One Squareroot


Here is a straight forward problem.

Problem  :  Solve for x :   sqrt(x+3) = x-2 .

>    Eq :=
       sqrt( x + 3) = x - 2;

Eq := (x+3)^(1/2) = x-2

             Step 1 . Since the square root is already isolated, square both sides.

>    SquareBothSides( %);

x+3 = (x-2)^2

 
          
Step 2 . Expand and simplify

>    SimplifyBothSides( %);

x+3 = x^2-4*x+4


          
Step 3 . Move everything to one side

>    AddBothSides( %, -lhs(%) );

0 = x^2-5*x+1


           
Step 4 . Solve the quadratic equation.

>    soln :=  solve(%, x);

soln := 5/2-1/2*21^(1/2), 5/2+1/2*21^(1/2)


           
Step 5 . The Often Forgotten Step - Check the answers!

>    subs( x = soln[1], Eq);  
SimplifyBothSides( %);
testeq( lhs(%) = rhs(%));

(11/2-1/2*21^(1/2))^(1/2) = 1/2-1/2*21^(1/2)

1/2*21^(1/2)-1/2 = 1/2-1/2*21^(1/2)

FAIL

>    subs( x = soln[2], Eq);  
SimplifyBothSides( %);
testeq( lhs(%) = rhs(%));

(11/2+1/2*21^(1/2))^(1/2) = 1/2+1/2*21^(1/2)

1/2+1/2*21^(1/2) = 1/2+1/2*21^(1/2)

true


The first solution fails, while the second works out. Therefore the solution to this problem is :

>    Answer := soln[2];

Answer := 5/2+1/2*21^(1/2)

2. Example 2 : Solving Equations With One Squareroot


Here is a straight forward problem.

Problem  :  Solve for x :   3*x-sqrt(2*x+1) = 4*x-9

>    Eq :=
       3*x - sqrt( 2*x + 1) = 4*x - 9;

Eq := 3*x-(2*x+1)^(1/2) = 4*x-9

 

 
          
Step 1 . Isolate the square root

>    AddBothSides( %, -3*x);

-(2*x+1)^(1/2) = x-9

            Step 2 . Square both sides.

>    SquareBothSides( %);

2*x+1 = (x-9)^2

 
          
Step 3 . Expand and simplify

>    SimplifyBothSides( %);

2*x+1 = x^2-18*x+81


          
Step 4 . Move everything to one side

>    AddBothSides( %, -lhs(%) );

0 = x^2-20*x+80


           
Step 5 . Solve the quadratic Equation.

>    soln :=  solve(%, x);

soln := 10-2*5^(1/2), 10+2*5^(1/2)


           
Step 6 . The Often Forgotten Step - Check the answers! It's possible

>    subs( x = soln[1], Eq);  
SimplifyBothSides( %);
testeq( lhs(%) = rhs(%));

30-6*5^(1/2)-(21-4*5^(1/2))^(1/2) = 31-8*5^(1/2)

31-8*5^(1/2) = 31-8*5^(1/2)

true

>    subs( x = soln[2], Eq);  
SimplifyBothSides( %);
testeq( lhs(%) = rhs(%));

30+6*5^(1/2)-(21+4*5^(1/2))^(1/2) = 31+8*5^(1/2)

29+4*5^(1/2) = 31+8*5^(1/2)

FAIL


In this case, the first solution succeeds, while the second fails. Therefore the solution to this problem is :

>    Answer := soln[1];

Answer := 10-2*5^(1/2)

3. Example 3 : Solving Equations With Two Squareroots


The plot thickens when there are two square roots. Basically, we need to square twice,
but being careful to isolate the square roots on one side the second time.

Problem  :  Solve for x :   sqrt(2*x+3)-sqrt(2*x-3) = 4 .

>    Eq :=
       sqrt( 2*x + 3) - sqrt( 2*x - 3) = 4;

Eq := (2*x+3)^(1/2)-(2*x-3)^(1/2) = 4

             Step 1 . Since the square root is already isolated, square both sides.

>    SquareBothSides( %);
SimplifyBothSides( %);

((2*x+3)^(1/2)-(2*x-3)^(1/2))^2 = 16

4*x-2*(2*x+3)^(1/2)*(2*x-3)^(1/2) = 16


          
 Step 2 . Move everything to one side

>    AddBothSides( %, -4*x );

-2*(2*x+3)^(1/2)*(2*x-3)^(1/2) = 16-4*x

 
         
  Step 3 . Now, square both sides a second time, and expand.

>    SquareBothSides( %);
SimplifyBothSides( %);

16*x^2-36 = 16*(-4+x)^2

16*x^2-36 = 256-128*x+16*x^2

 

          Step 4 . Move everything to one side to solve.

>    AddBothSides( %, -lhs(%) );

0 = 292-128*x


        
Step 5 . Solve the quadratic Equation.

>    soln :=  solve(%, x);

soln := 73/32


         
Step 6 . The Often Forgotten Step - Check the answer.

>    subs( x = soln, Eq);  
SimplifyBothSides( %);
testeq( lhs(%) = rhs(%));

1/16*121^(1/2)*16^(1/2)-1/16*25^(1/2)*16^(1/2) = 4

3/2 = 4

false


The only solution fails, so this means that there is no solution to this problem!

>    Answer := {};

Answer := {}


How can this be? Lets examine the original equation in more detail. If we graph the left and right hand sides of the original equation, we see the two never intersect. This is why there is no solution.

>    plot( { lhs(Eq), rhs(Eq)}, x = 1.5..100);

[Maple Plot]

>   

4. Example 4 : Solving Equations With Two Squareroots


The plot thickens when there are two square roots. Basically, we need to square twice,
but being careful to isolate the square roots on one side the second time.

Problem  :  Solve for x :   sqrt(2*x+3)-sqrt(2*x-3) = 4 .

>    Eq :=
       sqrt( 7 - x) +  sqrt( 7 + x) = x;

Eq := (7-x)^(1/2)+(7+x)^(1/2) = x

             Step 1 . Since the square root is already isolated, square both sides.

>    SquareBothSides( %);
SimplifyBothSides( %);

((7-x)^(1/2)+(7+x)^(1/2))^2 = x^2

14+2*(7-x)^(1/2)*(7+x)^(1/2) = x^2


          
 Step 2 . Move everything to one side

>    AddBothSides( %, -14 );

2*(7-x)^(1/2)*(7+x)^(1/2) = x^2-14

 
         
  Step 3 . Now, square both sides a second time, and expand.

>    SquareBothSides( %);
SimplifyBothSides( %);

196-4*x^2 = (x^2-14)^2

196-4*x^2 = x^4-28*x^2+196

 

          Step 4 . Move everything to one side to solve.

>    AddBothSides( %, -lhs(%) );
FactorBothSides( %);

0 = x^4-24*x^2

0 = x^2*(x^2-24)


        
Step 5 . Solve the equation. There are three unique ansers.

>    soln :=  solve(%, x);

soln := 0, 0, 2*6^(1/2), -2*6^(1/2)


         
Step 6 . Check the answers.

>    subs( x = soln[1], Eq);  
SimplifyBothSides( %);
testeq( lhs(%) = rhs(%));

2*7^(1/2) = 0

2*7^(1/2) = 0

false

>    subs( x = soln[2], Eq);  
SimplifyBothSides( %);
testeq( lhs(%) = rhs(%));

2*7^(1/2) = 0

2*7^(1/2) = 0

false

>    subs( x = soln[3], Eq);  
SimplifyBothSides( %);
testeq( lhs(%) = rhs(%));

(7-2*6^(1/2))^(1/2)+(7+2*6^(1/2))^(1/2) = 2*6^(1/2)

2*6^(1/2) = 2*6^(1/2)

true

>    subs( x = soln[4], Eq);  
SimplifyBothSides( %);
testeq( lhs(%) = rhs(%));

(7-2*6^(1/2))^(1/2)+(7+2*6^(1/2))^(1/2) = -2*6^(1/2)

2*6^(1/2) = -2*6^(1/2)

false


There is only one solution.

>    Answer := soln[3];

Answer := 2*6^(1/2)

>   


         © 2002 Waterloo Maple Inc