0% found this document useful (0 votes)
18 views18 pages

Untitled 1

good for mathematic

Uploaded by

yacob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views18 pages

Untitled 1

good for mathematic

Uploaded by

yacob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

introduction

Mathematica
In[1]:= 54
Out[1]= 54

In[2]:= 78
Out[2]= 78

In[4]:= π
Out[4]= π

In[3]:= x2 + 5 x

In[7]:= 5 x + x2
Out[7]= 5 x + x2

In[8]:= Plot5 x + x2 , {x, - 32.5, 27.5}

800

600

Out[8]=
400

200

-30 -20 -10 10 20


2

In[9]:= Show[%8, AxesLabel  {HoldForm[x - axis], HoldForm[y - axis]},


PlotLabel  None, LabelStyle  {FontFamily  "Arial", GrayLevel[0]}]
y - axis

800

600

Out[9]=

400

200

x - axis
-30 -20 -10 10 20

In[5]:= α
Out[5]= α

π6

In[10]:= a = 19 ^ 17
Out[10]= 5 480 386 857 784 802 185 939

In[11]:= b = 17 ^ 19
Out[11]= 239 072 435 685 151 324 847 153

In[13]:= c = a /. b

ReplaceAll: {239072435685151324847153} is neither a list of replacement rules nor a valid dispatch table, and so cannot be
used for replacing.

Out[13]= 5 480 386 857 784 802 185 939 /. 239 072 435 685 151 324 847 153

1917
In[15]:=
17.19
Out[15]= 0.0229235

In[16]:= 5

In[17]:= 5.
Out[17]= 2.23607

In[18]:= Ε
Out[18]= Ε
3

In[19]:= N[π]
Out[19]= 3.14159

In[20]:= 3 5

3 5 .
Out[21]= 6.7082

In[22]:= N 45 

Out[22]= 6.7082

n
In[23]:= 23
1
Out[23]= 23 n

23
In[24]:=
5
23
In[25]:=
5.
Out[25]= 4.6

In[26]:= Cos
Out[26]= Cos

In[27]:= De
Out[27]= De 2

In[28]:= Sin[45 °]

1
Out[28]=
2

In[29]:= Sin[120 °]
3
Out[29]=
2

In[30]:= Log[]
Out[30]= 1

In[31]:= Log2[4]
Out[31]= 2

In[34]:= Factor[t ^ 2 - 9]
Out[34]= (- 3 + t) (3 + t)
4

||

In[39]:= x = RandomReal[10, 20]

Out[39]= {4.60594, 7.33468, 3.7908, 8.56708, 5.3674, 1.4825, 8.50414, 2.35496, 8.82092, 9.84283,
1.8113, 5.90025, 4.74969, 9.43132, 5.43626, 4.73517, 2.00787, 0.522964, 7.06136, 1.87682}

In[42]:= Mean[data]

Out[42]= 5.11036

In[43]:= Median[x]
Out[43]= 5.05854

In[44]:= Commonest[x]
Out[44]= {4.60594, 7.33468, 3.7908, 8.56708, 5.3674, 1.4825, 8.50414, 2.35496, 8.82092, 9.84283,
1.8113, 5.90025, 4.74969, 9.43132, 5.43626, 4.73517, 2.00787, 0.522964, 7.06136, 1.87682}

In[45]:= Variance[x]

Out[45]= 8.56221

In[47]:= StandardDeviation[x]
Out[47]= 2.92613

In[48]:= a = {12, 14, 17, 12}

In[52]:= b = {10, 14, 17, 12}


Out[52]= {10, 14, 17, 12}

In[53]:= Commonest[b]
Out[53]= {10, 14, 17, 12}

In[62]:= f (x_) := x ^ 2
g (x_) := x ^ 2 * sin ^ 2 (x)

SetDelayed: Tag Times in f x_ is Protected.

Out[62]= $Failed

SetDelayed: Tag Times in g x_ is Protected.

Out[63]= $Failed

In[64]:= f (x_) := x ^ 2

SetDelayed: Tag Times in f x_ is Protected.


5

In[65]:= $Fail
clear x
Out[65]= $Fail

Out[66]= {4.60594 clear, 7.33468 clear, 3.7908 clear, 8.56708 clear, 5.3674 clear,
1.4825 clear, 8.50414 clear, 2.35496 clear, 8.82092 clear, 9.84283 clear,
1.8113 clear, 5.90025 clear, 4.74969 clear, 9.43132 clear, 5.43626 clear,
4.73517 clear, 2.00787 clear, 0.522964 clear, 7.06136 clear, 1.87682 clear}

In[67]:= clear x
Out[67]= {4.60594 clear, 7.33468 clear, 3.7908 clear, 8.56708 clear, 5.3674 clear,
1.4825 clear, 8.50414 clear, 2.35496 clear, 8.82092 clear, 9.84283 clear,
1.8113 clear, 5.90025 clear, 4.74969 clear, 9.43132 clear, 5.43626 clear,
4.73517 clear, 2.00787 clear, 0.522964 clear, 7.06136 clear, 1.87682 clear}

In[68]:= x
Out[68]= {4.60594, 7.33468, 3.7908, 8.56708, 5.3674, 1.4825, 8.50414, 2.35496, 8.82092, 9.84283,
1.8113, 5.90025, 4.74969, 9.43132, 5.43626, 4.73517, 2.00787, 0.522964, 7.06136, 1.87682}

In[69]:= clear[x]
Out[69]= clear[{4.60594, 7.33468, 3.7908, 8.56708, 5.3674, 1.4825, 8.50414, 2.35496, 8.82092, 9.84283,
1.8113, 5.90025, 4.74969, 9.43132, 5.43626, 4.73517, 2.00787, 0.522964, 7.06136, 1.87682}]

In[70]:= f[x_] := x ^ 2

In[74]:= g[x_] := x ^ 2 * sin ^ 2 (x)

In[75]:= f[g[π / 2]]


π6 sin4
Out[75]=
64

In[76]:= f[x_] := x ^ 2

In[84]:= g[x_] := x2 * Sin[x] ^ 2

In[85]:= f[g[π / 2]]

π4
Out[85]=
16

In[86]:= N[Sin[π / 4]]

In[87]:= 0.7071067811865475`
Out[87]= 0.707107

In[88]:= Sin[π / 4] // N
Out[88]= 0.707107
6

In[89]:= Expand[(x - 1) (2 + 3 x) (6 - x)]


Out[89]= {79.5145, - 202.948, 82.4467, - 538.106, 50.0131, 14.0536,
- 516.997, 44.7704, - 627.95, - 1071.38, 25.2626, 9.63017, 76.1802,
- 876.422, 45.7885, 76.5606, 32.2834, - 9.32459, - 149.151, 27.5862}

In[90]:= clear x
Out[90]= {4.60594 clear, 7.33468 clear, 3.7908 clear, 8.56708 clear, 5.3674 clear,
1.4825 clear, 8.50414 clear, 2.35496 clear, 8.82092 clear, 9.84283 clear,
1.8113 clear, 5.90025 clear, 4.74969 clear, 9.43132 clear, 5.43626 clear,
4.73517 clear, 2.00787 clear, 0.522964 clear, 7.06136 clear, 1.87682 clear}

In[92]:= clear all x


Expand[(x - 1) (2 + 3 x) (6 - x)]
Out[92]= {4.60594 all clear, 7.33468 all clear, 3.7908 all clear, 8.56708 all clear, 5.3674 all clear,
1.4825 all clear, 8.50414 all clear, 2.35496 all clear, 8.82092 all clear, 9.84283 all clear,
1.8113 all clear, 5.90025 all clear, 4.74969 all clear, 9.43132 all clear, 5.43626 all clear,
4.73517 all clear, 2.00787 all clear, 0.522964 all clear, 7.06136 all clear, 1.87682 all clear}

Out[93]= {79.5145, - 202.948, 82.4467, - 538.106, 50.0131, 14.0536,


- 516.997, 44.7704, - 627.95, - 1071.38, 25.2626, 9.63017, 76.1802,
- 876.422, 45.7885, 76.5606, 32.2834, - 9.32459, - 149.151, 27.5862}

In[94]:= f @ {1, 2, 3, 4, 5}
Out[94]= {1, 4, 9, 16, 25}

In[96]:= x = RandomReal[- 10, 10]


f[x_] = sinx
Out[96]= {- 7.3697, - 7.58426, - 0.906033, - 2.22249,
- 2.78404, - 5.28178, - 0.469702, - 1.36529, - 4.79171, - 6.97791}

Out[97]= sinx

In[98]:= f @ {x}
Out[98]= sinx

In[102]:= x = RandomReal[- 10, 10]


Out[102]= {- 5.33859, - 6.96853, - 2.63788, - 6.35689,
- 0.141622, - 5.12016, - 8.85926, - 2.90248, - 3.68451, - 6.76482}

In[100]:= f[x_] := Sin[x]

In[103]:= f @ {x}
Out[103]= {{0.810258, - 0.632939, - 0.482682, - 0.0736345,
- 0.141149, 0.918007, - 0.535857, - 0.236837, 0.516635, - 0.463233}}

In[104]:= x = RandomReal[10, 10]


Out[104]= {4.66042, 1.7515, 3.00703, 1.48599, 5.37734, 9.27724, 0.478886, 6.79108, 5.96134, 8.86657}
7

In[105]:= f[x_] := Sin[x]

In[106]:= f @ {x}
Out[106]= {{- 0.99865, 0.983717, 0.134158, 0.996406,
- 0.786944, 0.147001, 0.460791, 0.486337, - 0.316322, 0.529671}}

In[107]:= Sin[4.66042]
Out[107]= - 0.99865

In[108]:= ? Plot

Symbol

Plot[f , {x, xmin , xmax }] generates a plot of f as a function of x from xmin to xmax .

Plot[{f1 , f2 , …}, {x, xmin , xmax }] plots several functions fi .


Out[108]=

Plot[{…, w[fi ], …}, …] plots fi with features defined by the symbolic wrapper w.

Plot[…, {x} ∈ reg] takes the variable x to be in the geometric region reg.

In[109]:= Ethiopia

Out[109]= Failure
 Message:
Tag:
No network connection found. Please check your internet connectivity.
Offline

Query: Ethiopia

In[111]:= ? Inegrate
Out[111]= Missing[UnknownSymbol, Inegrate]

In[112]:= ? N*

System`

N Not
NakagamiDistribution NotCongruent
NameQ NotCupCap
Names NotDoubleVerticalBar
NamespaceBox Notebook
NamespaceBoxOptions NotebookApply
Nand NotebookAutoSave
NArgMax NotebookBrowseDirectory
NArgMin NotebookClose
NBernoulliB NotebookConvertSettings
NBodySimulation NotebookCreate
NBodySimulationData NotebookCreateReturnObject
NCache NotebookDefault
8

NDEigensystem NotebookDelete
NDEigenvalues NotebookDirectory
NDSolve NotebookDynamicExpression
NDSolveValue NotebookEvaluate
Nearest NotebookEventActions
NearestFunction NotebookFileName
NearestMeshCells NotebookFind
NearestNeighborG NotebookFindReturnObject
NearestNeighborGraph NotebookGet
NearestTo NotebookGetLayoutInformationPacket
NebulaData NotebookGetMisspellingsPacket
NeedCurrentFrontEndPackagePacket NotebookImport
NeedCurrentFrontEndSymbolsPacket NotebookInformation
NeedlemanWunschSimilarity NotebookInterfaceObject
Needs NotebookLocate
Negative NotebookObject
NegativeBinomialDistribution NotebookOpen
NegativeDefiniteMatrixQ NotebookOpenReturnObject
NegativeIntegers NotebookPath
NegativelyOrientedPoints NotebookPrint
NegativeMultinomialDistribution NotebookPut
NegativeRationals NotebookPutReturnObject
NegativeReals NotebookRead
NegativeSemidefiniteMatrixQ NotebookResetGeneratedCells
NeighborhoodData Notebooks
NeighborhoodGraph NotebookSave
Nest NotebookSaveAs
NestedGreaterGreater NotebookSelection
NestedLessLess NotebookSetupLayoutInformationPacket
NestedScriptRules NotebooksMenu
NestGraph NotebookTemplate
NestList NotebookWrite
NestTree NotElement
NestWhile NotEqualTilde
NestWhileList NotExists
NetAppend NotGreater
NetArray NotGreaterEqual
NetArrayLayer NotGreaterFullEqual
NetBidirectionalOperator NotGreaterGreater
NetChain NotGreaterLess
9

NetChain NotGreaterLess
NetDecoder NotGreaterSlantEqual
NetDelete NotGreaterTilde
NetDrop Nothing
NetEncoder NotHumpDownHump
NetEvaluationMode NotHumpEqual
NetExtract NotificationFunction
NetFlatten NotLeftTriangle
NetFoldOperator NotLeftTriangleBar
NetGANOperator NotLeftTriangleEqual
NetGraph NotLess
NetInformation NotLessEqual
NetInitialize NotLessFullEqual
NetInsert NotLessGreater
NetInsertSharedArrays NotLessLess
NetJoin NotLessSlantEqual
NetMapOperator NotLessTilde
NetMapThreadOperator NotNestedGreaterGreater
NetMeasurements NotNestedLessLess
NetModel NotPrecedes
NetNestOperator NotPrecedesEqual
NetPairEmbeddingOperator NotPrecedesSlantEqual
NetPort NotPrecedesTilde

Out[112]= NetPortGradient NotReverseElement


NetPrepend NotRightTriangle
NetRename NotRightTriangleBar
NetReplace NotRightTriangleEqual
NetReplacePart NotSquareSubset
NetSharedArray NotSquareSubsetEqual
NetStateObject NotSquareSuperset
NetTake NotSquareSupersetEqual
NetTrain NotSubset
NetTrainResultsObject NotSubsetEqual
NetUnfold NotSucceeds
NetworkPacketCapture NotSucceedsEqual
NetworkPacketRecording NotSucceedsSlantEqual
NetworkPacketRecordingDuring NotSucceedsTilde
NetworkPacketTrace NotSuperset
NeumannValue NotSupersetEqual
NevilleThetaC NotTilde
10

NevilleThetaD NotTildeEqual
NevilleThetaN NotTildeFullEqual
NevilleThetaS NotTildeTilde
NewPrimitiveStyle NotVerticalBar
NExpectation Now
Next NoWhitespace
NextCell NProbability
NextDate NProduct
NextPrime NProductFactors
NextScheduledTaskTime NRoots
NeymanScottPointProcess NSolve
NHoldAll NSolveValues
NHoldFirst NSum
NHoldRest NSumTerms
NicholsGridLines NuclearExplosionData
NicholsPlot NuclearReactorData
NightHemisphere Null
NIntegrate NullRecords
NMaximize NullSpace
NMaxValue NullWords
NMinimize Number
NMinValue NumberCompose
NominalVariables NumberDecompose
NonAssociative NumberDigit
NoncentralBetaDistribution NumberExpand
NoncentralChiSquareDistribution NumberFieldClassNumber
NoncentralFRatioDistribution NumberFieldDiscriminant
NoncentralStudentTDistribution NumberFieldFundamentalUnits
NonCommutativeMultiply NumberFieldIntegralBasis
NonConstants NumberFieldNormRepresentatives
NondimensionalizationTransform NumberFieldRegulator
None NumberFieldRootsOfUnity
NoneTrue NumberFieldSignature
NonlinearModelFit NumberForm
NonlinearStateSpaceModel NumberFormat
NonlocalMeansFilter NumberLinePlot
NonNegative NumberMarks
NonNegativeIntegers NumberMultiplier
NonNegativeRationals NumberPadding
NonNegativeReals NumberPoint
11

NonPositive NumberQ
NonPositiveIntegers NumberSeparator
NonPositiveRationals NumberSigns
NonPositiveReals NumberString
Nor Numerator
NorlundB NumeratorDenominator
Norm NumericalOrder
Normal NumericalSort
NormalDistribution NumericArray
NormalGrouping NumericArrayQ
NormalizationLayer NumericArrayType
Normalize NumericFunction
Normalized NumericQ
NormalizedSquaredEuclideanDistance NuttallWindow
NormalMatrixQ NValues
NormalsFunction NyquistGridLines
NormFunction NyquistPlot

DocumentationSearch`

NewDocumentationIndexMerger NewDocumentationNotebookIndexer

In[113]:= Integrate[Sinx, x]

Integrate: Invalid integration variable or limit(s) in


{4.66042, 1.7515, 3.00703, 1.48599, 5.37734, 9.27724, 0.478886, 6.79108, 5.96134, 8.86657}.

Out[113]= Integrate[Sinx,
{4.66042, 1.7515, 3.00703, 1.48599, 5.37734, 9.27724, 0.478886, 6.79108, 5.96134, 8.86657}]

In[114]:= clear[x]
Out[114]= clear[
{4.66042, 1.7515, 3.00703, 1.48599, 5.37734, 9.27724, 0.478886, 6.79108, 5.96134, 8.86657}]

In[115]:= Integrate[Sinx, x]

Integrate: Invalid integration variable or limit(s) in


{4.66042, 1.7515, 3.00703, 1.48599, 5.37734, 9.27724, 0.478886, 6.79108, 5.96134, 8.86657}.

Out[115]= Integrate[Sinx,
{4.66042, 1.7515, 3.00703, 1.48599, 5.37734, 9.27724, 0.478886, 6.79108, 5.96134, 8.86657}]

In[116]:= Clear[x]

In[117]:= Integrate[Sin[x], x]
Out[117]= - Cos[x]
12

In[118]:= v = Sin[x]
Out[118]= Sin[x]

In[119]:= Integrate[v, x]
Out[119]= - Cos[x]

In[120]:= bx = Sin[x]
Out[120]= Sin[x]

In[121]:= Integrate[bx, x]
Out[121]= - Cos[x]

Plot[Sin[x], {x, - π, π}], AxisLabel

Syntax: "Plot[Sin[x], {x, -π , π}], PlotLabel y=sin(x)" is incomplete; more input is needed.

In[123]:= Plot[Sin[x], {x, - π, π}], "PlotLabels y"

In[123]:= Plot[Sin[x], {x, - π, π}, PlotLabel  y = sin (x)]

Plot: Options expected (instead of PlotLabel  y = sin x) beyond position 2 in Plot[Sin[x], {x, -π , π}, PlotLabel  y = sin x]. An
option must be a rule or a list of rules.

In[125]:= Plot[Sin[x], {x, - π, π}, PlotLabel  "y=sin x", AxesLabel  Automatic]


y=sin x
1.0

0.5

Out[125]=
x
-3 -2 -1 1 2 3

-0.5

-1.0

In[126]:= Plot[Log[x, 3], {2, 5}]

Plot: Range specification {2, 5} is not of the form {x, xmin, xmax}.
13

Plot[Log[x, 3], {x, 2, 5},]


1.6

1.4

1.2
Out[127]=

1.0

0.8

2.5 3.0 3.5 4.0 4.5 5.0

In[128]:= ? Polt[option]
Out[128]= Missing[UnknownSymbol, Polt[option]]

In[130]:= ? Plot[Options]
Out[130]= Missing[UnknownSymbol, Plot[Options]]

In[131]:= ? Plot

Symbol

Plot[f , {x, xmin , xmax }] generates a plot of f as a function of x from xmin to xmax .

Plot[{f1 , f2 , …}, {x, xmin , xmax }] plots several functions fi .

Plot[{…, w[fi ], …}, …] plots fi with features defined by the symbolic wrapper w.

Out[131]= Plot[…, {x} ∈ reg] takes the variable x to be in the geometric region reg.

Documentation Web »

Options AlignmentPoint  Center … (64 total)

Attributes {HoldAll, Protected, ReadProtected}


Full Name System`Plot
14

In[138]:= Plot[Log[3, x], {x, 2, 5}, PlotStyle  Red, PlotLabel  True, PlotLegends  "Expressions"]

True

1.4

1.2

Out[138]=

1.0

0.8

0.6 2.5 3.0 3.5 4.0 4.5 5.0

In[141]:= Plot[{Log[3, x], 3 ^ x}, {x, 1, 5}, PlotLegends  "Expressions", PlotStyle  {Red, Black}]

120

100

80
log3 (x)
Out[141]=
60
3x
40

20

2 3 4 5

In[139]:= ? Plot

Symbol

Plot[f , {x, xmin , xmax }] generates a plot of f as a function of x from xmin to xmax .

Plot[{f1 , f2 , …}, {x, xmin , xmax }] plots several functions fi .


Out[139]=

Plot[{…, w[fi ], …}, …] plots fi with features defined by the symbolic wrapper w.

Plot[…, {x} ∈ reg] takes the variable x to be in the geometric region reg.
15

In[142]:= Plot3D[x ^ 2 + y ^ 2, {x, - 2, 2}, {y, - 2, 2}]

Out[142]=

x^2 y^2
In[144]:= Plot3D + , {x, - 2, 2}, {y, - 2, 2}
4 2

Out[144]=
16

x2 y2
In[145]:= Plot3D + , {x, - 2, 2}, {y, - 2, 2}, Mesh  Automatic, MeshFunctions  {#3 &}
4 2

Out[145]=

In[146]:= Show[%145, Background  LightGray]

Out[146]=
17

In[147]:= Show[%146, Background  LightGray]

Out[147]=

In[148]:= Show[%147, Background  Black]

Out[148]=
18

In[149]:= Show[%148, Lighting  "Neutral"]

Out[149]=

In[150]:= Show[%149, ViewPoint  Below]

Out[150]=

You might also like