1+1

vyr=3+(x^2)*Sin[1-x*(y^3)]

3+(x^2)*Sin[1-x*(y^3)]=3

a*b=3

a*b//FullForm

vyr=3+(x^2)*Sin[1-x*(y^3)]

Speak[vyr]

SpokenString[vyr]

vyr//FullForm

vyr[[0]]
(*hlavicka*)
Head[vyr]

FullForm[vyr]

TreeForm[vyr]

Sin@1
Sin[1]
1//Sin

(*listy*)
listik={1,{3,22},{auto,{alfa,romeo}}}

listik[[3]]

listik[[-1]][[2]][[1]]

listik[[-1,2,1]]

listik={1,{3,22},{auto,{alfa,romeo}}};
First[listik];
Last[listik];

listik[[0]];

x

res=Solve[(x^2)+a*x+(1-(a^2))==0,x]

FullForm[blbost->penize]

(x^2)+4/.x->"opice"

x/.{{x->"ja"},{x->"ty"}}

res=Solve[(x^2)+a*x+(1-(a^2))==0,x]

Plot[{Abs[(1/2) (-a-(Sqrt[-4+5 (a^2)]))],Abs[(1/2) (-a+(Sqrt[-4+5 (a^2)]))]},{a,-5,5},PlotStyle->Thick]

protisk=Abs[x]/.res

Plot[protisk,{a,-5,5},PlotStyle->Thick]

res=Solve[(x^2)+a*x+(1-(a^2))==0,x]

dosadZaXaY=Solve[{π x+E*y==I,E x-π*y==0},{x,y}][[1]]

x/.x->p
x/.{x->p}
x/.{{x->p}}

(x^2)+(y^2)/.dosadZaXaY
Simplify[%]
N[%]

(2^2)

6

a=2+3

?=

?:=

x

?_

(*funkce*)
ClearAll[f];
f[x_]:=(x^2);
f[x_,y_]:=(E^x)+(y^Pi);
f[{t_,x_}]:={t+0.1,x+0.1*(x^2)};
f[x_Integer]:=(x/2);
f[opice]:=opicak;
f[0]=156;

f[osel,mrkev]
f[krava]
f[{t0,x0}]

?f

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

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

Trace[a[4]]

?a

(*Pure Functions*)

listCisel=Range[50];

ClearAll[test];
test[x_]:=x>2;

Select[{1,2,4,7,6,2},test]

Select[{1,2,4,7,6,2},#>2&]

((#)^2)&[5]

ClearAll[f];
f[x_]:=(x^2)*Sin[#]&;
f[3][(Pi/4)]

f[3]

listik=Range[20]

ostrihej/@listik
Map[ostrihej,listik]

listik={ja,ty,on,ona};
natocPecko@@listik
Apply[natocPecko,listik]

Times@@Range[100]

Plus@@(((#)^2)&/@Range[100])

(∑_(i=1)^100)(i^2)

(*zacina prednes 2*)

Sin[2x]-2*Sin[x]*Cos[x]/.x->Random[]

a:=Random[]

?a

SeedRandom[2]
{a,a,a,a,a,a,a}

(*tvorba listu*)

list={1,2,8,8}

listik=Range[20]

Range[2,4.5]

Range[2,4.5,(1/2)]

Table[opice,{12}]

Table[(x^i),{i,10.}]

Table[(x^i),{i,2,10.}]

Manipulate[
Graphics[{Hue[hue],Disk[{0,0},1,{Pi/4,3Pi/4}]}]
,{hue,0,2},ControlPlacement->Top];

Length[barvicky]
Length[fce]

barvicky

fce=Table[(x^i),{i,2,20.,2}];
barvicky=Table[{Hue[i],Thick},{i,0,0.99,(0.99/(Length[fce]-1))}];
Plot[fce,{x,0,1},PlotStyle->barvicky,PlotRange->All];

(*2D listy*)

n=4;
matice=Table[(i^Pi)+(E^j),{i,n},{j,n}]
MatrixForm[matice];
Grid[matice,Frame->All];
Print["det= ",Det[matice]]
(*Inverse[matice]*)
Eigenvalues[matice]//N;
(*MatrixPower[matice,3.5]*)

DSolve[y''[x]+5y'[x]+6y[x]==(E^(-x))*Sin[7x],y[x],x]

(*DSolve[y''[x]+x*5y'[x]+6y[x]==(E^(-x))*Sin[7x],y[x],x]*)

ClearAll[a]

n=5;
rce=0==(∑_(i=0)^n)(Subscript[a, i])*(x^i);
Solve[rce,x];

resPresne=DSolve[{y'[t]==-0.5y[t],y[0]==10},y[t],t];
ypresne=y[t]/.resPresne[[1]];

EulerKrok[{t_,y_}]:={t+Δt,y+(((-1)/2)y)*Δt};
tmax=3.;
n=40;
Δt=(tmax/n);
pocStav={0,10};
resEuler=NestList[EulerKrok,pocStav,n];
pl1=ListPlot[resEuler,PlotStyle->{Red,PointSize[0.009]},AxesLabel->{"t [s]","y [V]"}];
pl2=Plot[ypresne,{t,0,tmax},PlotStyle->{Black,Thickness[0.004]}];
Show[pl1,pl2]

vyr=Tanh[((x-1)/0.001)];
dervyr=D[vyr,x];
Plot[Tanh[((x-1)/0.001)],{x,0,2}];
Plot[dervyr,{x,0,2},PlotRange->All];

Plot[Evaluate[D[Sin[x],x]],{x,0,2},PlotRange->All];

Sin'

Plot[Sin'[x],{x,0,2}];