x = 3 + a

?x

x

a->5

a->5//FullForm

3+a/.a->5

x/.a->3

x

x/. 3->a

x/.3->a

x/. 3.->a

how not to use replacement rules

x/.x->-10

(x+10)/.x->-10

x+10/.x->-10

a/.{x->5}

3+a/.{x->5}

maybe

x/.{3+a->5}

x

x/.a->x

x+y/.a->y

x/.{a->2,a->4}

x/.{a->2,3->4}

x+y/.{a->y,y->4}

x+y/.{a->y,y->a}

?Replace

?ReplaceRepeated

x+y//.{a->y,y->4}

x+y/.{a->y,y->4}

x+y//.{a->y,y->a}

x+y//.{a->y,y->2a}

x+y/.{a->y,y->2a}

%/.{a->y,y->2a}

%/.{a->y,y->2a}

%/.{a->y,y->2a}

x+y//.{a->y,y->2a}

(x+y/.{a->y})/.y->a

x+y/.{a->y}/.y->a

x+y/.{{a->y},{y->a}}

{3 a, a^2,3^a,a^a,a!}/.a->z

{3 a, a^2,3^a,a^a,a!}/.a->4

{3 a, a^2,3^a,a^a,a!}/.a->4.

{3 a, a^2,3^a,a^a,a!}/.a^_->Infinity

{3 a, a^2,3^a,a^a,a!}/._^_->Infinity

{3 a, a^2,3^a,a^a,a!}/.a_^b_->b^a

p[x_]:=x^3-Pi x^2-2 Pi x +3

Plot[p[t],{t,-3,4}]

sols=Solve[p'[t]==0,t]

p'[t]/.sols//Simplify

p[t]/.sols//N

ParametricPlot[
{Sin[u] u,Cos[u]u},
{u,0,100}
]

Options[ParametricPlot]

ParametricPlot[
{Sin[u] u,Cos[u]u},
{u,0,100},
Epilog->{Red,Line[{{0,0},{20,20}}]}
]

ParametricPlot[
{Sin[u]u ,Cos[u]u}, 
{u,0,100},
PlotPoints->125,
Axes->False,
ColorFunction->(ColorData["Rainbow"][#3]&),
MaxRecursion->0,
PlotStyle->Thick
]

x=exp1;
y:=exp2;

exp1->exp2
exp1:>exp2

Options[Simplify]

options[myProgram]={opt1->default1,opt2->value2};

myProgram[x_,y__,opt___]:=
definition[x,y]/.{opt}/.options[myProgram]

log[a b c d]//FullForm

Clear[x,y]

log[a b c d]/.log[x_ y_]->log[x] + log[y]

log[a b c d]//.log[x_ y_]->log[x] + log[y]

list=RandomInteger[20,{8}]

list//.{a_,b_}/;a>b->{b,a}

list//.{l___,a_,b_,r___}/;a>b->{l,b,a,r}

list=RandomInteger[10,{20}]

list//.
{l___,a_,b_,r___}/;a-b==5||a-b==-5->{a,b}

ReplaceList[
list,
{l___,a_,b_,r___}/;a-b==5||a-b==-5->{a,b}
]

list=RandomInteger[10,{6}]

ReplaceList[
list,
{l___,m__,r_}->{{l},{m},{r}}
]//ColumnForm

ReplaceList[
list,
{l___,m__,r__}->{{l},{m},{r}}
]//Length

list=RandomInteger[20,{30}]

k=20;
ReplaceList[
list,
{___,seq__,___}/;Apply[Plus,{seq}]==k->{seq}
]