Examples of Basic Operations in Mathematica

For each of the following inputs, try to guess how the output is produced:

(1/15)+(7/13)

(118/195)

%+1

(313/195)

N[%]

1.6051282051282052`

(((a/b)+(c/d))/((e/f)+(g/h)))

(((a/b)+(c/d))/((e/f)+(g/h)))

Simplify[%]

((b c f h+a d f h)/(b d f g+b d e h))

Solve[a x+b==c x+d, x]

{{x->((-b+d)/(a-c))}}

17>13

True

1/17 > 1/13

The symbol for the transcendental number E is chosen from the basic palette.   It is not the same as the Roman letter  e.

(E^π)  >   (π^E)

True

Factor[(((x^7)-(y^7))/(x-y))]

(x^6)+(x^5) y+(x^4) (y^2)+(x^3) (y^3)+(x^2) (y^4)+x (y^5)+(y^6)

Sin[(π/12)]

((-1+(Sqrt[3]))/(2 (Sqrt[2])))

NSolve[(x^3)+x+1 ==0, x]

{{x->-0.6823278038280194`},{x->0.34116390191400964` -1.161541399997252` I},{x->0.34116390191400964` +1.161541399997252` I}}

NSolve[x==5Log[x],x]

{{x->1.2958555090953687`},{x->12.713206788867632`}}

Factor[(x^5)-3(x^4) +(x^2)-3 x]

(-3+x) x (1+x) (1-x+(x^2))

Factor[(a^5)-(b^5)]

(a-b) ((a^4)+(a^3) b+(a^2) (b^2)+a (b^3)+(b^4))

Expand[(((1+x+(x^3)))^5)]

1+5 x+10 (x^2)+15 (x^3)+25 (x^4)+31 (x^5)+30 (x^6)+35 (x^7)+30 (x^8)+20 (x^9)+20 (x^10)+10 (x^11)+5 (x^12)+5 (x^13)+(x^15)

Plot[x Sin[x],{x,-30,30}, PlotStyle->{Red, Thick} ]

Plot[{Cos[5 x], 3 Sin[7 x], 3 x, x^2}, {x, -3,3}, PlotStyle->{Red,{Green,Thick}, Black,{Blue,Thick}}]

Expand[(((a - b))^7)]

(a^7)-7 (a^6) b+21 (a^5) (b^2)-35 (a^4) (b^3)+35 (a^3) (b^4)-21 (a^2) (b^5)+7 a (b^6)-(b^7)

Expand[(((1+(Sqrt[7])))^7)-(((1-(Sqrt[7])))^7)]

3248 (Sqrt[7])

Plot[x Sin[(1/x)], {x, -0.1,0.1}]

Plot[x Sin[(1/x)], {x, 0.3,5}, AxesOrigin->{0,0}]

Plot[((x^5)/(x!)), {x, 1, 10}, AxesOrigin->{0,0}, PlotStyle->{Red}]

Remark:  In Mathematica, ln x is represented by Log[x].

Plot[((Log[x])/x), {x, 1, 40}, AxesOrigin->{0,0}, PlotStyle->{Blue, Thickness[0.02]}]

Plot[(((((x^3)+5))^2)/((2x+1) (((x+1))^5))), {x, 1, 10}, AxesOrigin->{0,0}]

Plot[(Sqrt[(x^2)+x+1])-x, {x, 0, 10}, AxesOrigin->{0,0},PlotStyle->{Green, Thick}]

Functions

Defining a function is straightforward in Mathematica. For example:

g[x_] := (x/((x^2)+4))

g[11]

(11/125)

N[g[13]]

0.07514450867052024`

Plot[g[t], {t, -3, 2}]

Limits

Limit[(((x^5)+2017)/(((2x+2017))^5)), x->∞]

(1/32)

Limit[((Sin[3 x])/x), x->0]

3

Limit[((Log[(x^2013)])/(Log[(x^3)])), x->∞]

671

Derivatives

D[Sin[17 x] + (((1 + (x^5)))^17),x]

85 (x^4) (((1+(x^5)))^16)+17 Cos[17 x]

D[c x Log[x],x]

c+c Log[x]

D[ArcTan[5 t],t]

(5/(1+25 (t^2)))

Clear[f, g]

f[x_]:=   Log[1+Sin[x]]

D[f[x],x]

((Cos[x])/(1+Sin[x]))

g[x_]:=(((Sec[x]))^31)

((Sec[x])^31)

D[g[x],x]

31 ((Sec[x])^31) Tan[x]

(((a/b)+(c/d))/((e/f)+(g/h)))

Simplify[%]

Solve[a x+b==c x+d, x]

Factor[(((x^7)-(y^7))/(x-y))]

Sin[(π/12)]

NSolve[(x^3)+x+1 ==0, x]

NSolve[x==5Log[x],x]

Factor[(x^5)-3(x^4) +(x^2)-3 x]

Factor[(a^5)-(b^5)]

Expand[(((1+x+(x^3)))^5)]

Plot[x Sin[x],{x,-30,30}, PlotStyle->{Red, Thick} ]

Plot[{Cos[5 x], 3 Sin[7 x], 3 x, x^2}, {x, -3,3}, PlotStyle->{Red,{Green,Thick}, Black,{Blue,Thick}}]

Expand[(((a - b))^7)]

Expand[(((1+(Sqrt[7])))^7)-(((1-(Sqrt[7])))^7)]

Plot[x Sin[(1/x)], {x, -0.1,0.1}]

Plot[x Sin[(1/x)], {x, 0.3,5}, AxesOrigin->{0,0}]

Plot[((x^5)/(x!)), {x, 1, 10}, AxesOrigin->{0,0}, PlotStyle->{Red}]

Remark:  In Mathematica, ln x is represented by Log[x].

Plot[((Log[x])/x), {x, 1, 40}, AxesOrigin->{0,0}, PlotStyle->{Blue, Thickness[0.02]}]

Plot[(((((x^3)+5))^2)/((2x+1) (((x+1))^5))), {x, 1, 10}, AxesOrigin->{0,0}]

Plot[(Sqrt[(x^2)+x+1])-x, {x, 0, 10}, AxesOrigin->{0,0},PlotStyle->{Green, Thick}]

Functions

A funtion, y = g(x),may be defined by: 
g[x_] := (x/((x^2)+4))

f[13]

N[f[13]]

Plot[f[t], {t, -21, 21

Limits

Limit[(((x^5)+2013)/(((2x+2013))^5)), x->∞]

Limit[((Sin[3 x])/x), x->0]

Limit[((Log[(x^2013)])/(Log[(x^3)])), x->∞]

Derivatives

D[Sin[17 x] + (((1 + (x^5)))^17),x]

D[c x Log[x],x]

D[ArcTan[5 t],t]

Clear[f, g]

f[x_]:=   Log[1+Sin[x]]

D[f[x],x]

g[x_]:=(((Sec[x]))^31)

D[g[x],x]