Start of the 1st lesson

1+1

sin

Sin

kyncl123
123kyncl

5 6

5 6

a=5

a=5;

a+1==4

1==1

ClearAll[a]
a+1==4

Sin[5]

Sin[5.]

(Sqrt[3.])

(Sqrt[2])

(Sqrt[2.])

(Sqrt[8])

N[Pi]
Pi//N
N@Pi

N[(Sqrt[2])]
(Sqrt[2])//N

((10!)/(13!))+((11!)/(14!))

N[(Sqrt[2])]
(Sqrt[2])//N
N@(Sqrt[2])

60!//N

Sin[Pi]

Plot[Sin[3x],{x,0,6Pi}]

Plot

Plot[Cos[(Sqrt[x])],{x,0,1000}]

?Plot

?=

a=2

?:=

a:=2
?a

a=Random[]

?a

a-a

{a,a,a,a,a}

a:=Random[]

?a

a-a

{a,a,a,a,a}

?_

ClearAll[f];
x=4;
f[x:_]:=(x^2);
f[5]

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

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

?f

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

ClearAll[f,x];
f[x_]=Integrate[x*Sin[(x^2)+1],x]
f[1.5]

ClearAll[f,x];
f[x_]:=Integrate[x*Sin[(x^2)+1],x]
f[1.5]

ClearAll[f];
f[x_]:=x;
f[x_Integer]:=(1/x);
f[5]="frog";
f[6]

$RecursionLimit=(10^4);
ClearAll[a];
a[n_]:=n*a[n-1];
a[0]:=1;
Timing[Table[a[i],{i,1000}]][[1]]
?a

ClearAll[a];
a[n_]:=a[n]=n*a[n-1];
a[0]:=1;
Timing[Table[a[i],{i,10}]][[1]]
?a;

Trace[a[3]];

Timing[Table[a[i],{i,10}]][[1]]

ClearAll[f];
f[{a_,b_}]:=a+b;
f[{a_,2}]:="error";
f[x_]:=1;
f[Plot[Sin[x],{x,0,1}]]

ClearAll[f];
f[x_]:=Module[{y,z,w},
y=(x^0.2);
z=Cos[y];
w=y+(1/z);
{y,z,w}
];
f[2]

ClearAll[f];
f[x_]:=Module[{y,z,w},
{y,z,w}
];
f[2]

Plot[Sin[x],{x,0,5}]

GoldenRatio//N

Plot[{Sin[x],Cos[2x]},{x,0,5},AspectRatio->(3/GoldenRatio)]

Options[Plot]

{AlignmentPoint->Center,AspectRatio->(1/GoldenRatio),Axes->True,AxesLabel->None,AxesOrigin->Automatic,AxesStyle->{},Background->None,BaselinePosition->Automatic,BaseStyle->{},ClippingStyle->None,ColorFunction->Automatic,ColorFunctionScaling->True,ColorOutput->Automatic,ContentSelectable->Automatic,CoordinatesToolOptions->Automatic,DisplayFunction:>$DisplayFunction,Epilog->{},Evaluated->Automatic,EvaluationMonitor->None,Exclusions->Automatic,ExclusionsStyle->None,Filling->None,FillingStyle->Automatic,FormatType:>TraditionalForm,Frame->False,FrameLabel->None,FrameStyle->{},FrameTicks->Automatic,FrameTicksStyle->{},GridLines->None,GridLinesStyle->{},ImageMargins->0.`,ImagePadding->All,ImageSize->Automatic,ImageSizeRaw->Automatic,LabelStyle->{},MaxRecursion->Automatic,Mesh->None,MeshFunctions->{#1&},MeshShading->None,MeshStyle->Automatic,Method->Automatic,PerformanceGoal:>$PerformanceGoal,PlotLabel->None,PlotLabels->None,PlotLegends->None,PlotPoints->Automatic,PlotRange->{Full,Automatic},PlotRangeClipping->True,PlotRangePadding->Automatic,PlotRegion->Automatic,PlotStyle->Automatic,PlotTheme:>$PlotTheme,PreserveImageOptions->Automatic,Prolog->{},RegionFunction->(True&),RotateLabel->True,ScalingFunctions->None,TargetUnits->Automatic,Ticks->Automatic,TicksStyle->{},WorkingPrecision->MachinePrecision}

Plot[Sin[(Sqrt[x])],{x,0,40Pi},AxesLabel->{"x","Sin[(Sqrt[x])]"},PlotStyle->{Thick,Blue,Dashed},GridLines->Automatic,PlotLabel->"Graph"]

?/.

teacher1+teacher2/.{teacher1->stupid,teacher2->ok}

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

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

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

{a,b,c,t}[[2]]

sol=Solve[(x^3)==1.]
sol[[1]]
x1=x/.sol[[1]];

eqns={x+y==2b,2x+13y==(b^2)};
sol=Solve[eqns,{x,y}]

forPlot=((Sqrt[b])-(x^2)-(y^2)/.sol)//Simplify

Plot[forPlot,{b,1,2},PlotStyle->{Red,Thick},AxesLabel->{"b","forPlot"}]

Solve[a x+y==7&&b x-y==1,{x,y}]

Solve[{a x+y==7,b x-y==1},{x,y}]

DSolve[y'[x]+x*y[x]==x,y[x],x]

DSolve[{y'[x]+x*y[x]==x,y[0]==6},y[x],x]

ClearAll[y]

sol2=DSolve[{y'[t]+5*y[t]==Sin[t],y[0]==5},y[t],t]

fp=y[t]+0.1((y[t])^2)/.sol2

Plot[fp,{t,0,5},PlotStyle->{Blue},GridLines->Automatic,AxesLabel->{"t","forplot"}]

DSolve[{y'[x]+x*y[x]==x,y[0]==6},y[x],x]

ClearAll["Global`*"]
f[a_]:=x/.FindRoot[Cos[x]==a*x,{x,0}];
f[5]

ClearAll["Global`*"]
f[a_]:=x/.FindRoot[5+Sin[x]==a*x,{x,0}];

Plot[((f[a])/(1+((f[a])^2))),{a,1,2}]

ClearAll["Global`*"]
list={a,b,c,d};
TreeForm[list];
a+b+c+d//TreeForm;
list/.List->Plus

Range[100]/.List->Plus