# \ #
# "Given:" #
# "1)" \ \ p \in P( RR ). #
# "2)" \ \ ( p(x) - 5 ) \ \ "is divisible by" \ \ ( x + 5 ). #
# "3)" \ \ ( p(x) + 5 ) \ \ "is divisible by" \ \ ( x - 5 ). #
# "Determine:" #
# "Remainder, when" \ \ p(x) \ \ "is divided by" \ \ ( x^2 - 25 ). #
# \ #
# "Analysis." #
# "1)" \ \ ( p(x) - 5 ) \ \ "is divisible by" \ \ ( x + 5 ) \ rArr #
# \qquad \qquad \ p(x) - 5 \ = \
( x + 5 ) \cdot u(x); \qquad \quad "for some" \ \ u(x) \in P( RR ). #
# "2)" \ \ ( p(x) + 5 ) \ \ "is divisible by" \ \ ( x - 5 ) \ rArr #
# \qquad \qquad \ p(x) + 5 \ = \
( x - 5 ) \cdot v(x); \qquad \quad "for some" \ \ v(x) \in P( RR ). #
# "3) a) From (1):" \qquad \ p(x) = ( x + 5 ) \cdot u(x) + 5; \quad \quad \ \ u(x) \in P( RR ). #
# \quad \quad "b) From (2):" \qquad \ p(x) = ( x - 5 ) \cdot v(x) - 5; \quad \quad \ \ v(x) \in P( RR ). #
# "4) Consider the division of" \ \ p(x) \ \ "by" \ \ ( x^2 - 25 ); \ \ "resulting in a" \ "quotient," \ \ q(x), \ "and a remainder," \ \ r(x). "We write:" #
# \ p(x) \ = \ q(x) ( x^2 - 25 ) + r(x); \quad "for some" \ \ q(x), r(x) \in P( RR ), #
# \qquad \qquad \qquad "where:" \ \ "deg" \ r(x) <= "deg" \ ( x^2 - 25 ) \quad "or" \quad r(x) = 0. #
# \qquad \qquad \qquad "i.e.:" \qquad \qquad \qquad \quad "deg" \ r(x) <= 2 \qquad "or" \qquad r(x) = 0. #
# \qquad \qquad \qquad :. \qquad \qquad \qquad \qquad r(x) \ = \ a x + b ; \qquad \qquad \quad "for some" \ \ a, b \in RR. #
# \qquad \ "We seek to find the remainder:" \qquad \quad \r(x). #
# "5) Substitute" \ \ r(x) \ \ "into the first equation in (4):" #
# \ p(x) \ = \ q(x) ( x^2 - 25 ) + a x + b; \qquad \quad "for some" \ \ a, b \in RR. \qquad \ (1) #
# "6) a) Substitute" \ \ x = 5 \ \ "into eqn. (1) above:" #
# \qquad \qquad \qquad \qquad p(5) \ = \ color{red}cancel{ q(5) ( 5^2 - 25 ) } + a ( 5 ) + b #
# :. \qquad \qquad \qquad \qquad p(5) \ = \ 5 a + b. #
# \qquad "b) Now substitute" \ \ x = -5 \ \ "into eqn. (1) above:" #
# \qquad \qquad \quad \ p(-5) \ = \ color{red}cancel{ q(-5) ( (-5)^2 - 25 ) } + a ( -5 ) + b #
# :. \qquad \qquad \quad \ p(-5) \ = -5 a + b. #
# \qquad "c) Collecting the two results from (6a) and (6b) together:" #
# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad \ p(5) \ = \ 5 a + b. #
# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad \ (2)#
# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \ \ p(-5) \ = -5 a + b. #
# "7) a) Substituting:" \qquad x = -5 \qquad "into (3a):" #
# \qquad \qquad \qquad p(-5) = \color{red}cancel{ ( -5 + 5 ) \cdot u(-5) } + 5 = 5. #
# \qquad \qquad :. \qquad \qquad p(-5) = 5. #
# \qquad"b) Substituting:" \qquad x = 5 \qquad "into (3b):" #
# \qquad \qquad \qquad \quad p(5) = \color{red}cancel{ ( 5 - 5 ) \cdot v(5) } - 5 = -5. #
# \qquad \qquad :. \qquad \qquad p(5) = -5. #
# \qquad"c) Collecting the two results from (7a) and (7b) together:" #
# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad p(-5) = 5. #
# \qquad \qquad \qquad \qquad\qquad \qquad \qquad \qquad \qquad \qquad p(5) = -5. #
# \qquad"d) Substituting the two results from (7c) into the two results" #
# "in (6c), we find:" #
# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad -5 \ = \ 5 a + b. #
# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \ 5 \ = \ -5 a + b. #
# \qquad"e) Solving the" \ \ 2 xx 2 \ \ "system in (7c) above, we find easily:" #
# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad \ \ \ a \ = \ -1, \qquad \quad b \ = \ 0. #
# \qquad"f) Substituting the values of the two constants in (7e) into the" #
# "expression for" \ \ r(x) \ \ "at the bottom of (4) above, we obtain:" #
# \qquad \qquad \qquad \quad \ \ r(x) \ = \ a x + b \ = \ (-1) x + 0 \ = \ - x. #
# \qquad \qquad "Thus:" \qquad \qquad \qquad \qquad \quad r(x) \ = \ - x. #
#"This is the result we sought -- recalling from (4), that" \ \ r(x) \ \ "is the remainder, when" \ \ p(x) \ \ "is divided by" \ \ ( x^2 - 25 ). #
# \ #
# "Hence, summarizing, we have:" #
# "Remainder, when" \ \ p(x) \ \ "is divided by" \ \ ( x^2 - 25 ), \ \ "is:" \quad - x. #
# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad \ square #