1+1

a=1;
b=a-1;

(Sqrt[5])

(Sqrt[5.])

Sqrt[5]

vyr=(((x^2)+1)/((x^3)+(x^2)+1))

?*Lapla*

InverseLaplaceTransform[(((s^2)+1.)/((s^3)+2)),s,t]

N[Pi]
N@Pi
Pi//N

N[InverseLaplaceTransform[(((s^2)+1)/((s^3)+2)),s,t]]

InverseLaplaceTransform[(((s^2)+1)/((s^3)+2)),s,t]//N

kyncl je vul

kyncl*je*vul

ovce12

12ovce

vyr=(((x^2)+1)/((x^3)+(x^2)+1));

TreeForm[vyr]

ClearAll[f];
f[x]=(x^2);
f[x]
f[2]

?_

ClearAll[f];(*komentar*)
f[x_]:=(x^2);
f[x]
f[2]

ClearAll[f];
f[x_]:=(x^2);

f[y+(x^2)]

ClearAll[f];
f[x_]:=(x^2);

ClearAll[f];
f[x_]=(x^2);
f[2]

x=5;
ClearAll[f];
f[x_]=(x^2);
f[2]
?f

x=5;
ClearAll[f,x];
f[x_]=(x^2);
f[2]
?f

ClearAll[g,x];
g[x_]=x*Random[];
?g

ClearAll[g,x];
g[x_]:=x*Random[];
?g

ClearAll[g,x];
g[x_]:=Integrate[Sin[x]*x,x];
g[1]

ClearAll[g,x];
g[x_]=Integrate[Sin[x]*x,x];
g[1]
?g

ClearAll[g,a,b];
g[{x_,y_}]:=(x^2)-y;
g[z_]:=1-(E^z);
g[5]
g[{a,b}]
g[{1,2,3}]

ClearAll[g,a,b];
g[{x_,y_}]:=(x^2)-y;
g[z_]:=1-(E^z);
g[{x_,x_}]:="ocet";
g[{x_,1}]:="pes"
g[{ja,1.,5}]

ClearAll[a];
a[n_]:=n*a[n-1];
a[0]:=1;
a[6]

Trace[a[3]];

ClearAll[a];
a[n_]:=a[n]=n*a[n-1];
a[0]:=1;

a[5]

Trace[a[6]]

?/.

((x+y)/(y^2))/.x->5

((x+y)/(y^2))/.{x->5,y->E}

x/.{{x->1},{x->2}}

(*dom ukol: hrat si se
Solve
Part
Plot
*)

(*zde zacina dalsi kousek*)

ClearAll["Global`*"]

Solve[(x^2)==1.]

x+y/.x->E

x+y/.{x->E,y->Pi}

x+y/.{{x->E},{y->Pi}}

Solve[(x^2)==1.]

rce=((t^2)+1)*(x^2)+(x/((t^2)+1))+(t^2)+1==0;
dosadZaIxy=Solve[rce,x];

rce=((t^2)+1)*(x^2)+(x/((t^2)+1))+(t^2)+1==0;
dosadZaIxy=Solve[rce,x];
x1=x/.dosadZaIxy[[1]];
x2=x/.dosadZaIxy[[2]];
ClearAll[f]
f[t_]=Abs[x1]+Abs[x2];
Plot[f[t],{t,-10,10}]

Sin[3.56]

{a,b,{c,{d,e}},f}[[3,2,1]]
{a,b,{c,{d,e}},f}[[3]][[2]][[1]]

obr1=Plot[{Sin[t],Cos[t]},{t,-10,10},AxesLabel->{"x","Sin[x]  Cos[x]"},PlotStyle->{{Red,Thick},{Blue,Dashed,Thick}},Background->Yellow];

SetDirectory[NotebookDirectory[]]

Export["prvniobr.png",obr1,ImageResolution->600]

ClearAll[der,EulerStep];
der[t_,y_]:=y+t;
EulerStep[{t_,y_}]:={t+Δt,y+der[t,y]*Δt};
tstart=0;
tmax=5;
n=20000;
Δt=1.*((tmax-tstart)/n);
reseni=NestList[EulerStep,{tstart,1},n];
ListPlot[reseni]

reseni[[-1]]

?y

ClearAll[y]
res=NDSolve[{y'[t]==y[t]+t,y[0]==1},y,{t,0,tmax}]
Plot[Evaluate[y[t]/.res],{t,0,tmax},PlotRange->All]