Post Reply 
problem with canonical_form
08-13-2018, 07:35 PM (This post was last modified: 08-13-2018 07:36 PM by compsystems.)
Post: #1
problem with canonical_form
canonical_form(x^2-6*x+y^2+10*y+18) returns poly1[153+(x-3)^2]

Source:
free book "Doing Mathematics withScientic WorkPlace"
https://www.sciword.co.uk/manuals/

[Image: Doing_Mathematics_with_Scientic_WorkPlac...mage00.png]

http://www.wolframalpha.com/input/?i=can...10*y%3D-18

canonical form x^2-6*x+y^2+10*y=-18 =>
(x - 3)^2 + (y + 5)^2 - 16 = 0

Project Emu48 Skins for android ► https://www.hpmuseum.org/forum/thread-14...25336.html
Find all posts by this user
Quote this message in a reply
08-14-2018, 08:44 AM
Post: #2
RE: problem with canonical_form
According to the help provided by the calculator and also by the User Guide, canonical_form works with one variable only. Your function has two: x and y.
Find all posts by this user
Quote this message in a reply
08-15-2018, 10:38 AM
Post: #3
RE: problem with canonical_form
[Image: compsqu.jpg]

Happy August holidays and best,

Aries Wink
Find all posts by this user
Quote this message in a reply
08-15-2018, 01:44 PM (This post was last modified: 08-15-2018 02:12 PM by Komanguy.)
Post: #4
RE: problem with canonical_form
(08-13-2018 07:35 PM)compsystems Wrote:  canonical_form(x^2-6*x+y^2+10*y+18) returns poly1[153+(x-3)^2]

You got this weird result because your cas variable ‘y’ is no longer symbolic. You must reset it.

Quote:canonical form x^2-6*x+y^2+10*y=-18 =>
(x - 3)^2 + (y + 5)^2 - 16 = 0

Unless I’m wrong, the canonical form of a quadratic expression
ax^2+bx+c is a[(x+b/2a)^2−(b^2−4ac)/4a^2], x is the only variable

If you have two variables you should use the canonical_form fonction for each single variable.

In this example, instead of canonical_form(x^2-6*x+y^2+10*y+18)
you should use
canonical_form(x^2-6*x)+canonical_form(y^2+10*y+18)

It’s more in accordance with the definition of a canonical form.

[Image: 293_B25_FE-5382-449_F-_BDD9-_B321_C9_E88199.jpg]

Guy R. KOMAN, hp 50G, hp Prime Rev. C
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)