Chapter 1 - An Introduction to Mathematica

Section 1.2 - Basic Arithmetic

1+1

Sum[k^2,{k,1,10}]

Sum[(π^k),{k,1,3}]

N[Sum[(π^k),{k,1,3}],10]

Sum[(3.14159265^k),{k,1,3}]

Product[(1/k),{k,1,5}]

FactorInteger[90]

(2^1)(3^2)(5^1)

GCD[210,90]

LCM[630]

QuotientRemainder[83,5]

5 16 + 3

Expand[(7(x^3)+5(x^2)-9x+1)(-4(x^6)-(x^5)+ 3(x^4)-2(x^3)+(x^2)-8 x + 5)]

PolynomialQuotientRemainder[-4 (x^6)-(x^5)+3 (x^4)-2 (x^3)+(x^2)-8 x+5,7 (x^3)+5 (x^2)-9 x+1,x]

Poly1 = 7 (x^3)+5 (x^2) -9x + 1

Poly2 = -4 (x^6)-(x^5)+3 (x^4)-2(x^3)+(x^2)-8x + 5

Expand[Poly1 Poly2]

QR=PolynomialQuotientRemainder[Poly2,Poly1,x]

Expand[QR[[1]] Poly1+QR[[2]]]

NRoots[Poly1==0,x]

{ToRules[%]}

Poly1/.%

Poly2Roots=N[Roots[Poly2==0,x],10]

Rules={ToRules[Poly2Roots]}

Poly2/.Rules

Rules[[2]][[1]][[2]]

Poly2Roots[[2]][[2]]

Poly=Expand[-4 Product[x-Poly2Roots[[k]][[2]],{k,1,6}]]

Sum[Re[Coefficient[Poly,x,k]] (x^k),{k,0,6}]

Chop[Poly,(10^(-7))]

Product[k-(k+2) I,{k,0,3}]