How to expand (x-1.95)(x-4)(x+7.98) in the Prime?
04-24-2016, 03:42 PM (This post was last modified: 04-24-2016 03:45 PM by bigjohnson.)
Post: #1
 bigjohnson Junior Member Posts: 1 Joined: Apr 2016
How to expand (x-1.95)(x-4)(x+7.98) in the Prime?
Hey guys, I'm having a problem expanding expressions involving decimal numbers.

I type the expression (in CAS) then I put to simplify, but it doesn't. It returns the same expression, but if I do with natural numbers it does expand.

For example, for (x-1.95)(x-4)(x+7.98) it should return x^3+2.03 x^2-39.681 x+62.244, but it doesn't, it returns the same input expression.

But for example, if I type (x-1)(x-4)(x+7) and put to simlify, it does return the expanded form x^3+2 x^2-31 x+28

Does anyone know how to overcome this?

Thanks a lot!
04-24-2016, 03:56 PM
Post: #2
 roadrunner Senior Member Posts: 332 Joined: Jun 2015
RE: How to expand (x-1.95)(x-4)(x+7.98) in the Prime?
Try:

normal((x-1.95)*(x-4)*(x+7.98)) --> x^3+2.03*x^2-39.681*x+62.244
normal((x-1)*(x-4)*(x+7)) --> x^3+2*x^2-31*x+28

-road
04-24-2016, 03:58 PM (This post was last modified: 04-24-2016 04:03 PM by DrD.)
Post: #3
 DrD Senior Member Posts: 1,132 Joined: Feb 2014
RE: How to expand (x-1.95)(x-4)(x+7.98) in the Prime?
Did you try:

expand((x-1.95)*(x-4)*(x+7.98)) ==> x^3+2.03*x^2-39.681*x+62.244
expand((x-1)*(x-4)*(x+7)) ==> x^3+2*x^2-31*x+28

-Dale-
04-24-2016, 04:00 PM
Post: #4 Terje Vallestad Member Posts: 150 Joined: Dec 2013
RE: How to expand (x-1.95)(x-4)(x+7.98) in the Prime?
(04-24-2016 03:42 PM)bigjohnson Wrote:  Hey guys, I'm having a problem expanding expressions involving decimal numbers.

I type the expression (in CAS) then I put to simplify, but it doesn't. It returns the same expression, but if I do with natural numbers it does expand.

For example, for (x-1.95)(x-4)(x+7.98) it should return x^3+2.03 x^2-39.681 x+62.244, but it doesn't, it returns the same input expression.

But for example, if I type (x-1)(x-4)(x+7) and put to simlify, it does return the expanded form x^3+2 x^2-31 x+28

Does anyone know how to overcome this?

Thanks a lot!

If you use expand() as per your subject line you get the result you want.
I.e. expand((x-1.95)*(x-4)*(x+7.98)) -> x^3+2.03 x^2-39.681 x+62.244

Cheers, Terje
 « Next Oldest | Next Newest »

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