4
$\begingroup$

Can I express a polynomial function in Mathematica in power (ScientificForm) ? I was trying:

f[x_] = 10000 x^5 + 1278 x^4 + 113 x^3 + 89 x^2 + x + 12;
Print[ScientificForm[f[x]]];

But it gives me 12+x+89 x^2+113 x^3+1278 x^4+10000 x^5 whereas I was looking something like 10^5 x^5 + 1.2X10^3 x^4 + 1.1X10^2 x^3 + 8.9X10^1+x+12.

Is it possible? Note that I may not want to keep all the numbers after the decimal point. Here in the example, I preferred one place after the decimal point.

$\endgroup$
1
  • $\begingroup$ Try making the numbers floating point rather than integers, i.e., 10000.0 and 1278.0 instead of 10000 and 1278 $\endgroup$
    – bill s
    Dec 21 '14 at 18:06
6
$\begingroup$

You can use N

f[x_] = 10000 x^5 + 1278 x^4 + 113 x^3 + 89 x^2 + x + 12;
ScientificForm[N[f[x]]]

enter image description here

equ = N[10000 x^5 + 1278 x^4 + 113 x^3 + 89 x^2 + x + 12]

enter image description here

ScientificForm[%, 3]

enter image description here

How to | Change the Format of Numbers, is for more reading.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.