Group Abstract Group Abstract

Message Boards Message Boards

0
|
58 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

How to complete the square for a specific part of an expression?

Posted 18 hours ago
16/((-4 + m)^2 + 4 m^2) == 16/(64/5 + 5 (-(4/5) + m)^2)

Example1:For the equation above, how can we manipulate it to complete the square in the denominator of the left-hand fraction and obtain the right-hand side?

2 Sqrt[4 - 16/((-4 + m)^2 + 4 m^2)] == 
 2 Sqrt[4 - 16/(64/5 + 5 (-(4/5) + m)^2)]

Example2:How can one complete the square in the denominator of the fractional expression inside the radical on the left-hand side so as to obtain the expression on the right-hand side?

(4 (12 - 8 m + 5 m^2))/(16 - 8 m + 5 m^2) == (
 4 (44/5 + 5 (-(4/5) + m)^2))/(64/5 + 5 (-(4/5) + m)^2)

Example3:For the equation above, since both the numerator and the denominator of the left-hand expression can be completed-square, how can one simultaneously complete the square in both the numerator and the denominator to obtain the form shown on the right-hand side?

In other words, how can the left-hand expression be transformed into the completed-square form shown on the right-hand side using Mathematica code?

POSTED BY: Wen Dao

You can use ResourceFunction["CompleteTheSquare"], or this imitation of mine:

squareCompletion[pol_, var_] /; Exponent[pol, var] == 2 :=
 Module[{var0, x},
  var0 = SolveValues[D[pol, var] == 0, var][[1]];
  Collect[pol /. var -> var0 + x, x] /. x -> var - var0]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard