unn.ru · web viewwith(vector calculus); it should be noted, that after loading this package...
TRANSCRIPT
МИНИСТЕРСТВО НАУКИ И ВЫСШЕГО ОБРАЗОВАНИЯ РОССИЙСКОЙ ФЕДЕРАЦИИ
Федеральное государственное автономное образовательное учреждение высшего образования
«Национальный исследовательский Нижегородский государственный университет им. Н.И. Лобачевского»
С.Н.СтребуляевН.Л. Oрлова
COMPUTER ALGEBRA «MAPLE» IN ENGINEERING КОМПЬЮТЕРНАЯ АЛГЕБРА «MAPLE» В ИНЖЕНЕРИИ
Учебно-методическое пособие
Рекомендовано методической комиссией ИИТММ для иностранных студентов ННГУ, обучающихся по направлению
подготовки02. 03. 02 “Фундаментальная информатика и информационные
технологии”
Нижний Новгород2018
1
УДК 519. (075)ББК В19 С-84
С 84 Стребуляев С.Н., Орлова Н.Л. КОМПЬЮТЕРНАЯ АЛГЕБРА «MAPLE» В ИНЖЕНЕРИИ: учебно-методическое электронное пособие. – Нижний Новгород: Нижегородский госуниверситет, 2018. – 152 с.
Рецензент: профессор кафедры «Программная инженерия», д.ф.-м.н., профессор Федоткин М.А.
Учебно-методическое пособие разработано в соответствии с требованиями учебной программы по дисциплинам «Математические модели в естествознании» и «Методы оптимизации». В пособии приведены алгоритмы, программные средства , которые использовались авторами работы в течение ряда лет для решения инженерных задач прикладной математики. Представленный материал служит для закрепления лекционного материала и способствует более эффективному использованию вычислительной техники при решении конкретных задач динамики систем, теории колебаний и теории автоматического регулирования.
Учебно-методическое пособие предназначено для иностранных студентов четвертого курса, обучающихся по направлению «Фундаментальная информатика и информационные технологии» в Институте информационных технологий, математики и механики ННГУ им. Н.И. Лобачевского.
УДК 519.(075) ББК 22
© Нижегородский государственный
2
университет им. Н.И. Лобачевского, 2018
Contents
Introduction………………………………………………………………………...4
1. The main packages, operators and functions of the system of analytical calculations Maple……………………………………………………………………........6
1.1 The packages of functions……………………………………………………7
1.2 The methods of giving task to functions and drawing of their diagrams……12
1.3 The calculation of limits……………………………………………………...28
1.4 The calculation of derivatives………………………………………………...31
1.5 Integrals calculus……………………………………………………...............37
1.6 Operations with rows…………………………………………………….. …43
1.7 Solving equations, inequalities and their systems……………………………53
1.8 The analysis of functions………………………………………………….…62
1.9 Solving differential equations and their systems…………………………….71
1.10 Operations with vectors and matriсes ………………………………………90
1.11 The transformation of complex members, analytical expressions and functions of complex variables……………………………………………………………..101
2. Test assignments for doing laboratory tests on computer…………………...109
The list of used sources…………………………………………………………150
The appendix………………………………………………………………….…151
3
Introduction
One of the stages of the process of mathematical models is development of
software. Much attention is always paid to this stage in the chain “object – calculation – mathematical model – software” – analysing the results by an electronic computer. In the process of the development of software in the first stage particularly this software is set up. The second stage is devoted to the most crucial task, using this software, namely, the identification of the parameters of the mathematical model. That is why, great demands are made to software in working of the user with it: convenient interface, high speed in calculations, syntactic and semantic control in the process of introducing the parameters, etc. Nowadays there are lots of opportunities for personal computers such as high speed, memory volume, the saturation of programming means, which enable the user to model sophisticated dynamic systems, avoiding the simplification (sometimes without any grounds) of their mathematical models.
The permanent growth of calculating opportunities of modern computers enables the user to hope for successful solving more and more complicated tasks. Parallel with programming languages there appeared the systems of analytical calculations (SAC): Maple, Mathematica, Matlab, etc. The usage of SAC (the systems of computer algebra with broadened opportunities in the field of symbolic calculations) enables the user to automatize the process of writing programs even on a more lavish scale.
The system of Maple |1| ranks high among SAC. The systems of computer mathematics of Maple class were made, by the Waterloo Maple corporation (Canada) as the systems of computer algebra with broadened opportunities in the field of symbolic calculations. Maple is a typical integrated system.
It comprises:
- high-powered programming language;
- editing device for preparing; and editing documents and programs;
- modern multi-windowed user’s interface with opportunities of working in the dialogue conditions;
- high-powered information system with thousands of examples;
4
-the main body of algorithms and transformation rules of mathematical expressions;
- memory and symbolic processors;
- the system of diagnosing;
- the libraries of installed and supplementary functions;
- the package of functions of other producers and backing and support of other programming languages and programs.
On examining a large number of publications devoted to describing SAC such terms as "high- powered language", "information system", etc. are often mentioned, which actually corresponds to reality. The author’s experience confirms it, for instance, while solving a number of complicated tasks of dynamics of systems, connected with transformation of cumbersome expressions, we were bound to give up using the programming language Fortran in favour of the system of analytical calculations Maple.
While writing this manual, the authors used the material, given in the list of the used sources; there are described the examples of using the systems, received by the authors, while solving particular problems. The first section tackles a brief description of opportunities of this system and the examples of its usage. The second section touches upon mathematical models of particular systems and the complexes of programs for these calculations. The third section is devoted to particular tasks for laboratory work.
5
1. The main packages ,operators and functions. The systems of analytical calculations MAPLE
This section tackles the opportunities of the system for solving problems
from different branches of mathematics: mathematical analysis,algebra,geometry, the theory of functions & others.A brief description of packages & the examples of using functions for solving various problems are given:drawing diagrams of functions, calculating the limits,derivatives & integrals, operations with lines, solving equations , inequalities& their systems, the analysis of functions , solving differential equations ,operations with vectors & matrices, transformation of complex numbers & expressions.These examples are taken from well-known sources for various branches of mathematics , so that the user might control the correctness of solving problems ,implementing the functions of the MAPLE system
The basis for working with symbolic transformations into MAPLE is the nucleus of the system. It contains hundreds of basic functions & algorithms of symbolic transformations. The volume of nucleus can reach 6 or 7 Mbite.Besides; the main library of operators, commands& functions is available. Many functions, inserted into it, as well the functions of the nucleus can be used without any declaration, and others need declaring. A great number of functions, as well as the functions, rarely used in calculations of special types are implemented in problem – oriented packages. The package is switched on by the command: with < the name of the package >.
We shall start describing the most widely used packages with the package of two- or three – dimensional diagrams < plots >. The package “plots “contains 50 diagram functions, essentially broadening the opportunities of drawing two- or three- dimensional diagrams. Among these functions one should mark the means of drawing a number of new types in terms of level lines, vector fields & others, as well as the means of combining several graphics. While solving the problems of the system dynamics, special attention should be paid to the functions, enabling to draw two- or one – dimensional graphics.
Below we turn to the package of diagrams& a list of functions, included into this package.
A unique opportunity of the MAPLE system is the opportunity of solving the problems of linear algebra in terms of symbols. Numerical methods of solving the problems of linear algebra are also implemented. They are widely used in the main spheres of its implementation- mathematical models, the system dynamics, the theory of control & others. The package of solving the problems of linear algebra LINALG is one of the most widely used & powerful packages in this field. To look through the functions, located in this package it is sufficient to use the command: WITH /LINALG/;
6
In new implementations of the system the main emphasis was placed upon using fast algorithms of linear algebra. Their usage provides effective implementation of the system of symbolic mathematics in solving the problems, referring to linear algebra. The mentioned above programming means are located in the package LINEAR ALGEBRA. To load this package one should use the command > WITH / LINEAR ALGEBRA/<
.
1.1.
> restart:> with(plots);
Interactive animate animate3d animatecurve arrow changecoords complexplot, , , , , , ,[complexplot3d conformal conformal3d contourplot contourplot3d coordplot, , , , , ,coordplot3d cylinderplot densityplot display display3d fieldplot fieldplot3d, , , , , , ,gradplot gradplot3d graphplot3d implicitplot implicitplot3d inequal interactive, , , , , , ,interactiveparams listcontplot listcontplot3d listdensityplot listplot listplot3d, , , , , ,
loglogplot logplot matrixplot multiple odeplot pareto plotcompare pointplot, , , , , , , ,pointplot3d polarplot polygonplot polygonplot3d polyhedra_supported, , , , ,polyhedraplot replot rootlocus semilogplot setoptions setoptions3d spacecurve, , , , , , ,sparsematrixplot sphereplot surfdata textplot textplot3d tubeplot, , , , , ]
. :
> with(linalg);
7
BlockDiagonal GramSchmidt JordanBlock LUdecomp QRdecomp Wronskian addcol, , , , , , ,[addrow adj adjoint angle augment backsub band basis bezout blockmatrix, , , , , , , , , ,charmat charpoly cholesky col coldim colspace colspan companion concat cond, , , , , , , , , ,copyinto crossprod curl definite delcols delrows det diag diverge dotprod, , , , , , , , , ,eigenvals eigenvalues eigenvectors eigenvects entermatrix equal exponential, , , , , , ,
extend ffgausselim fibonacci forwardsub frobenius gausselim gaussjord geneqns, , , , , , , ,genmatrix grad hadamard hermite hessian hilbert htranspose ihermite indexfunc, , , , , , , , ,innerprod intbasis inverse ismith issimilar iszero jacobian jordan kernel, , , , , , , , ,laplacian leastsqrs linsolve matadd matrix minor minpoly mulcol mulrow, , , , , , , , ,multiply norm normalize nullspace orthog permanent pivot potential randmatrix, , , , , , , , ,
randvector rank ratform row rowdim rowspace rowspan rref scalarmul, , , , , , , , ,singularvals smith stackmatrix submatrix subvector sumbasis swapcol swaprow, , , , , , , ,sylvester toeplitz trace transpose vandermonde vecpotent vectdim vector, , , , , , , ,wronskian]
В новых реализациях системы была сделана ставка на использование
быстрых алгоритмов линейной алгебры. Их применение обеспечивает эффективное использование систем символьной математики в решении задач, сводящихся к задачам линейной алгебры. Указанные программные средства реализованы в пакете LinearAlgebra. Для загрузки этого пакета используется команда:> with(LinearAlgebra);
&x Add Adjoint BackwardSubstitute BandMatrix Basis BezoutMatrix, , , , , , ,[BidiagonalForm BilinearForm CharacteristicMatrix CharacteristicPolynomial, , , ,Column ColumnDimension ColumnOperation ColumnSpace CompanionMatrix, , , , ,ConditionNumber ConstantMatrix ConstantVector Copy CreatePermutation, , , , ,CrossProduct DeleteColumn DeleteRow Determinant Diagonal DiagonalMatrix, , , , , ,Dimension Dimensions DotProduct EigenConditionNumbers Eigenvalues, , , , ,Eigenvectors Equal ForwardSubstitute FrobeniusForm GaussianElimination, , , , ,GenerateEquations GenerateMatrix GetResultDataType GetResultShape, , , ,GivensRotationMatrix GramSchmidt HankelMatrix HermiteForm, , , ,HermitianTranspose HessenbergForm HilbertMatrix HouseholderMatrix, , , ,IdentityMatrix IntersectionBasis IsDefinite IsOrthogonal IsSimilar IsUnitary, , , , , ,JordanBlockMatrix JordanForm LA_Main LUDecomposition LeastSquares, , , , ,LinearSolve Map Map2 MatrixAdd MatrixExponential MatrixFunction, , , , , ,MatrixInverse MatrixMatrixMultiply MatrixNorm MatrixPower, , , ,MatrixScalarMultiply MatrixVectorMultiply MinimalPolynomial Minor Modular, , , , ,
8
Multiply NoUserValue Norm Normalize NullSpace OuterProductMatrix, , , , , ,Permanent Pivot PopovForm QRDecomposition RandomMatrix RandomVector, , , , , ,Rank RationalCanonicalForm ReducedRowEchelonForm Row RowDimension, , , , ,RowOperation RowSpace ScalarMatrix ScalarMultiply ScalarVector SchurForm, , , , , ,SingularValues SmithForm SubMatrix SubVector SumBasis SylvesterMatrix, , , , , ,ToeplitzMatrix Trace Transpose TridiagonalForm UnitVector, , , , ,VandermondeMatrix VectorAdd VectorAngle VectorMatrixMultiply VectorNorm, , , , ,VectorScalarMultiply ZeroMatrix ZeroVector Zip, , , ]
The package Curve Fitting implements the procedure of approximating
curves. It contains a number of functions:
with(Curve Fitting);
BSpline BSplineCurve Interactive InteractiveChangeSlider LeastSquares, , , , ,[PolynomialInterpolation RationalInterpolation Spline ThieleInterpolation, , , ]
These functions include: the function for calculating B-spline curves,p olynomial & spline approximation,the method of the least squares ,the functions of rational approximation & approximation of continued fractions,approximation by Taylor line & polynomic, by Chebyshev polynomials & Chebyshev –Pade approximation.
The package INTTRANS is intended for expansive support of integral transformations. This package is called by the command:
with(inttrans);
addtable fourier fouriercos fouriersin hankel hilbert invfourier invhilbert invlaplace, , , , , , , , ,[invmellin laplace mellin savetable, , , ]
& contains a number of functions, covering such important fields of mathematics as Fourier’ rows, direct & indirect transformations of Fourier, Laplace & Gilbert, integral transformations of Henkel & Melvin.
The package STUDENT is one of the most attractive ones for students & post-graduates.It contains the most widely used & necessary functions,used by this category of users in their practical work. with(student);
9
D Diff Doubleint Int Limit Lineint Product Sum Tripleint changevar, , , , , , , , , ,[completesquare distance equate integrand intercept intparts leftbox leftsum, , , , , , , ,makeproc middlebox middlesum midpoint powsubs rightbox rightsum, , , , , , ,showtangent simpson slope summand trapezoid, , , , ]
Orthogonal polynomials are widely used in various mathematical calculations while making up interpolation algorithms, extrapolations of various functional dependencies, where the characteristics of orthogonality provide high estimation of errors. The package ORTHOPOLY contains orthogonal polynomials: of Hagenщ, щawe, Hermit, Lager, Legendre, Jacobi & Chebyshev. The package is called by the command: > with(orthodoxy);
[ ], , , , ,G H L P T U
The package Vector Calculus provides the assess to different commands & functions of vector analysis, theory of field & supplements of differential calculation. This package is oriented in the first place to solving the problems of mathematical physics, where the methods of the theory of field & supplements of differential calculation are used. This Package is called by the command: with(Vector Calculus);
&x * + - . <,> <|> AddCoordinates ArcLength BasisFormat Binormal CrossProd, , , , , , , , , , , ,[CrossProduct Curl Curvature D Del DirectionalDiff Divergence DotProd, , , , , , , ,DotProduct Flux GetCoordinateParameters GetCoordinates Gradient Hessian, , , , , ,Jacobian Laplacian LineInt MapToBasis Nabla Norm Normalize PathInt, , , , , , , ,PrincipalNormal RadiusOfCurvature ScalarPotential SetCoordinateParameters, , , ,
SetCoordinates SurfaceInt TNBFrame Tangent TangentLine TangentPlane, , , , , ,TangentVector Torsion Vector VectorField VectorPotential Wronskian diff evalVF, , , , , , , ,int limit series, , ]
It should be noted, that after loading this package modifies most operators, commands & functions, installed into the nucleus of the system. That is why one should be very careful while using the package. To restore the role of functions one may use the command RESTART.
To carry out a number of special operations with polynomial or set up polynomials with particular qualities there is a package Polynomial Tools. This package has a small number of functions: with(Polynomial Tools);
10
This package contains the functions of splitting, sorting & transforming polynomials & others.
Solving differential equations of various types is one of the advantages of the system of analytical calculations MAPLE. The package DEtools offers a number of useful functions for solving differential equations & the systems of equations: with(DEtools);
AreSimilar DEnormal DEplot DEplot3d DEplot_polygon DFactor DFactorLCLM, , , , , , ,[DFactorsols Dchangevar FunctionDecomposition GCRD Gosper Heunsols, , , , , ,Homomorphisms IsHyperexponential LCLM MeijerGsols, , , ,MultiplicativeDecomposition PDEchangecoords PolynomialNormalForm, , ,RationalCanonicalForm ReduceHyperexp RiemannPsols Xchange Xcommutator, , , , ,
Xgauge Zeilberger abelsol adjoint autonomous bernoullisol buildsol buildsym, , , , , , , ,canoni caseplot casesplit checkrank chinisol clairautsol constcoeffsols convertAlg, , , , , , , ,convertsys dalembertsol dcoeffs de2diffop dfieldplot diff_table diffop2de, , , , , , ,dperiodic_sols dpolyform dsubs eigenring endomorphism_charpoly equinv eta_k, , , , , , ,eulersols exactsol expsols exterior_power firint firtest formal_sol gen_exp, , , , , , , ,
generate_ic genhomosol gensys hamilton_eqs hypergeomsols hyperode indicialeq, , , , , , ,infgen initialdata integrate_sols intfactor invariants kovacicsols leftdivision liesol, , , , , , , ,line_int linearsol matrixDE matrix_riccati maxdimsystems moser_reduce, , , , , ,muchange mult mutest newton_polygon normalG2 ode_int_y ode_y1 odeadvisor, , , , , , , ,odepde parametricsol particularsol phaseportrait poincare polysols, , , , , ,
power_equivalent ratsols redode reduceOrder reduce_order regular_parts, , , , , ,regularsp remove_RootOf riccati_system riccatisol rifread rifsimp rightdivision, , , , , , ,rtaylor separablesol singularities solve_group super_reduce symgen, , , , , ,symmetric_power symmetric_product symtest transinv translate untranslate, , , , , ,varparam zoom, ]
This package offers the most exquisite means for analytical & numerical solution of differential equations & their systems. For solving differential equations with quotient derivatives its visualization a special instrumental package is implemented <PDEtools>:
with(PDEtools);
PDEplot TWSolutions build casesplit charstrip dchange dcoeffs declare difforder, , , , , , , , ,[dpolyform dsubs mapde separability splitstrip splitsys undeclare, , , , , , ]
11
A large number of physical constants, implemented in calculations are given with using the following package:
with(Scientific Constants);
AddConstant AddElement AddProperty Constant Element GetConstant GetConstants, , , , , , ,[GetElement GetElements GetError GetIsotopes GetProperties GetProperty, , , , , ,GetUnit GetValue HasConstant HasElement HasProperty ModifyConstant, , , , , ,ModifyElement ]
> Get Constant(g);standard_acceleration_of_gravity symbol g value 9.80665 uncertainty 0, , , ,
unitsms2
> g:=evalf(Constant(g,units));
:= g 9.80665
ms2
This section tackles only a small part of packages of applied programs, used
for solving the problems of the class, mentioned above. The information about other packages can be received in the reference book of the system Maple, as well as in a large number of books, devoted to the description of this system.
1.2. The methods of giving tasks to functions & the drawing of their graphs In the system of analytical calculations there exist 4 methods of giving tasks
to functions. Method 1. Defining the function with the help of the operator of
appropriating (:=), for example> restart;> f[1]:=sin(x)^3+1;
:= f1 ( )sin x 3 1
To calculate the meaning of the function in some particular point , it is necessary to implement the following 2 operators:> x:=Pi/4; f[1];
:= x4
12
2
4 1
> 1/4*2^(1/2)+Pi;
24
After carrying out these commands a variable X has the given meaning Pi/4. Not to give the variable a particular value, it is more convenient to use the command of substitution SUBS in the following way: > a:=subs({x=Pi/4},f[1]);
:= a 24 1
To get an approximate meaning of the former expression in terms of the number with floating comma, we use the command:
> evalf(%); # The symbol(%) is used for Calling the former command;
1.353553390
Method 2 . Defining the function with the help of functional operator who correlates the independent variable < argument > & the meaning of the dependent variable < function>:
> f[2]:=(t)->t^3+exp(t); := f2 t t3 et
Turning to this function is carried out by the usual for specialists method:
> f[2](1); f[2](3);1 e
27 e3
The approximate meanings are received in the following way :
> evalf(f[2](1)); evalf(f[2](3));3.718281828
47.08553692
Method 3Giving the task to the function with the help of the command .
> f[3]:=unapply(y^6+y,y);13
:= f3 y y6 y
> f[3](1); f[3](5);2
15630
Method 4 The task of piece linear function. For example: The
> f[4]:=piecewise(z<0,1,z>=0 and z<1, z, z>=1,cos(z));
:= f4
1 z 0z and 0 z z 1( )cos z 1 z
The above mentioned methods of giving tasks to functions can be applied for the functions from several variables.
For drawing the graphs of functions the package PLOTS is used It is given in the following way
plot(f, h,v,g), where f — visualized function,
h — the argument of the function, with defining the sphere of its changev — not obligatory variable— g — a set of parameters, defining the style of drawing the graph of
functions.For two –dimensional graph the following most widely used parameters are
possible<g>):axes — defines the type of coordinate axes, allows the meanings: frame,
boxed, normal, none; axesfont — defines the print for representing the inscriptions of coordinate
scale the type of print (times,courier,helvetica,symbol), its style (bold, italic, bolditalic), as well as its size;
color — the color of the line for representing the graph of the functionи: aquamarine, black,
blue, navy, coral, cyan, brown, gold, green, gray, khaki, magenta, maroon, orange, pink, plum, red, sienna, tan, turquoise, violet,wheat, white, yellow;cords — the parameter defines the coordinate system, representing the
graph: Cartesian — to pass over, bipolar, cardioid, cassinian,elliptic, hyperbolic, invcassinian, invelliptic logarithmic, logcosh, rose & Maxwell, parabolic, tangent;
14
discont — if the formal parameter of the function equals TRUE, checking of the function for discount is carried out. The meaning of the parameter equals FALSE;
font — the parameter defines the print for representing inscriptions of texts (times, courier, Helvetica или symbol) & the style of the print (roman, bold, italic, bolditalic) on the graph;
labels — the parameter defines the inscriptions for the axes of coordinates; the parameter is given in2 lines for the abcciss axis &for the coordinate axis;
labelfont — the parameter defines the print for the coordinate axes;legend — the legend of the graph, for several graphs there is given the list
each element of which is the legend for a particular graph;linestyle — line style: solid, dot, dash, dashdot;numpoints — the parameter presents the minimum quantity of basic points
for drawing the graph < this number equals 50>;scaling — the parameter presents the scale by the coordinate axes
(constrained) & (unconstrained); style — the parameter of the line style (line), (point), (patch), (patchnogrid);symbol — the type of symbols for representing the basic points(box),
(cross), (circle), (point), (diamond);symbolize — the size of symbols for representing the basic points, it equals
10. title — the title of the drawing;title font — the print of the title of the drawing;thickness — the parameter, defining the thickness of the line for drawing the
graph (0–15). Below there are given the examples of drawing the graphs of functions,
given in different forms.> restart: with(plots): Warning, the name changecoords has been redefined
For the explicit function the drawing of the graph is carried out in the following way:
> f[1]:=(x)->(x^2-x-6)/(x-2);
:= f1 xx2 x 6x 2
> plot(f[1](x),x=1..3,color=red,thickness=2);
15
If to give the limits for changing the value of the function, the graphic pattern will become more understandable: > plot(f[1](x),x=-2..6,y=-50..50,color=red,thickness=2);
Analytically given function can also be used in the operator plot:> plot((x^2-x-6)/(x-2),x=1..3,y=-50..50,thickness=2);
16
The limit of changing the argument can be infinite (infinity).> plot(ln(1+cos(x)),x=0..infinity,color=blue,thickness=2);
> plot(ln(1+cos(x)),x=0..infinity,y=-5..0,color=blue,thickness=2);
17
For the function with discont the drawing of continuous graph is possible discont=true (discont=false):> plot(ln(1+tan(x)),x=-10..10,discont=true,color=gold,thickness=2);
> plot(ln(1+tan(x)),x=-10..10,color=gold,thickness=2);
18
The drawing of several functions in one axes is carried out in the following way:
plot([sin(x),sin(x)/x,sin(x^3/100)],x=-10..10,color=red,thickness=2);
> plot([sin(x),sin(x)/x,sin(x^3/100)],x=-10..10,color=[black,blue,red],style=[line,line,point],thickness=2);
19
The drawing of the graph of the function, presented by separate points is carried out in the following way:> restart:> p:=[[i,sin(i/3)]$i=1..30]:# -the procedure giving the sequence of points;
> plot(p,x=0..30,color=black,style=point,symbol=circle,symbolsize=20,thickness=4);
20
plot([[0,0],[1,0.5],[2,0.7],[3,0.4],[5,0.2]],x=0..5,style=line,symbol=circle,color=blue,thickness=2);
plot([[0,0],[1,0.5],[2,0.7],[3,0.4],[5,0.2]],x=0..5,style=point,symbol=circle,color=black,thickness=4);
The drawing of functions, defined by the meaning of vector elements: > restart:> x:=[0,1,2,3,4,5,6,7]: y:=[2,1.79,1.27,0.571,-0.2,-
0.678,-0.758,-0.538]:>
21
> pare:=(x,y)->[x,y]; := pare ( ),x y [ ],x y
> Coordxy:=zip(pare,x,y,2);
Coordxy [ := , , , , , , ,[ ],0 2 [ ],1 1.79 [ ],2 1.27 [ ],3 0.571 [ ],4 -0.2 [ ],5 -0.678 [ ],6 -0.758 [ ],7 -0.538 ]
> plot(Coordxy,style=[line,point],symbol=circle,axes=boxed,thickness=2);
The drawing of graph of the function by the given procedure:
> restart:> w:=proc(x) if sin(x)>0 then sin(x) else -sin(x) fi
end; := w proc( ) end procx if then else end if0 ( )sin x ( )sin x ( )sin x
plot(w,-15..15,color=black,thickness=2);
22
Drawing graphs of piece-linear functions:> restart:> f[1]:=piecewise(x<0,x^2,x);
:= f1 { x2 x 0x otherwise
> plot(f[1],x=-10..10,color=black,thickness=2);
The drawing of the graphs of the functions presented by functional operators & installed functions:> restart:> plot([exp/2,sin,x->x^2,x->x^3],-
1..1,color=black,thickness=3,title="EVERYTHING WILL BE ALL RIGHT ",titlefont=[TIMES,BOLD,10]);
23
The drawing of functions, presented parametrically: > restart:>
plot([sin(3*t),cos(5*t),t=0..2*Pi],color=black,thickness=3);
> x:=2*(cos(t)^3);y:=3*(sin(t)^3);
:= x 2 ( )cos t 3
:= y 3 ( )sin t 3
plot([x,y,t=0..2*Pi],color=orange,title="АСТРОИДА",titlefont=[TIMES,BOLD,15],thickness=3);
24
The drawing of functions, presented in the polar coordinate system:> restart:> plot([2*(1-
cos(phi)),phi,phi=0..2*Pi],color=black,coords=polar,title="КАРДИОИДА", titlefont=[TIMES,BOLD,15],thickness=3);
> polarplot(phi,phi=0..8*Pi,title="Archimedes spiral ",titlefont=[HELVETICA,BOLD,10],thickness=3); П The drawing of the graph of the implicit function :
25
> restart:with(plots): implicitplot(x^3+y^3-2*x*y=0,x=-2..1.5,y=-2..2,color=green,title="Descartes list",titlefont=[HELVETICA,BOLD,10],numpoints=10000,thickness=3);
> The drawing of the graphs of functions from 2 variables is carried out with
the help of installed into the nucleus of the function
plot3d.For drawing the explicit function z = z(x,y) the procedure plot3d(z,x = a..b,
y = c..d,p)is used, and for the function with а parametrical form of the task - x = x(t), y = y(t), z = z(t) – plot3d([x,y,z], a..b,c..d,p).
Drawing the explicit functions:
> restart; > z[1]:=(x,y)->cos(x^2+2)*sin(y^2+2);
:= z1 ( ),x y ( )cos x2 2 ( )sin y2 2
plot3d(z[1](x,y),x=-10..10,y=-10..10,color=blue,thickness=1,axes=frame);
26
> restart;> z[2]:=(x,y)->cos(x*y)*sin(x*y);
:= z2 ( ),x y ( )cos x y ( )sin x y
> plot3d(z[2](x,y),x=-2..2,y=-2..2,color=blue,thickness=1,axes=boxed);
> restart;
> plot3d(sin(x^2+y^2)*x^2,x=-2..2,y=-2..2,color=blue,thickness=1,axes=normal);
27
> restart;> plot3d(sin(x^2+y^2)*x^2,x=-2..2,y=-
2..2,style=hidden,color=blue,thickness=2); >
Drawing the graph of the function in the cylindrical coordinate system :> restart:> plot3d(h^2,a=-Pi..Pi,h=-5..5,coords=cylindrical,style=patch,title=" NONLINEAR conus",thickness=1);
28
The current section tackles the most widely used operators for drawing 2-or 3 –dimensional graphs of functions, used for visualizing the results of the research.1.3. Calculating the limits
For calculating the limits of the function with x->a the following function is used:
limit(f(x),x = a, g), where f(x) — algebraic expression,
x — the name of the variable, g — the parameter, referring to the direction of searching the limit — left,
right — , real — in the field of real numbers, complex — complex numbers. a — can be (infinity), both positive ,and negative. The examples of implementing this function are given below:> restart;> with(linalg):> Limit(f(x),x=a);
limx a
( )f x
> Limit(sin(x)^tan(x),x=0)=limit(sin(x)^tan(x),x=0);
limx 0
( )sin x( )tan x
1
> Limit((1+(3/x)^x),x=infinity)=limit((1+(3/x)^x),x=infinity);
29
limx
1
3x
x
1
> Limit(arcsin(sqrt(x^2+x)+x),x=infinity)==limit(arcsin(sqrt(x^2+x)+x),x=infinity);
limx
( )arcsin x2 x x I
> Limit((1/x)-(1/exp(x)-1),x=0)==limit((1/x)-(1/exp(x)-1),x=0);
limx 0
1x
1ex 1 undefined
> Limit(((x+2^x)^(1/x)),x=infinity)==limit(((x+2^x)^(1/x)),x=infinity);
limx
( )x 2x
1x
2
> Limit(1-exp(-x),x=infinity)==limit(1-exp(-x),x=infinity);
limx
1 e( ) x
1
> Limit(exp(x),x=infinity)=limit(exp(x),x=infinity);lim
x ex
> Limit((Pi-2*x)*tan(x),x=Pi/2)==limit((Pi-2*x)*tan(x),x=Pi/2);
limx
2
( ) 2 x ( )tan x 2
> Limit(tan(x),x=Pi/2)=limit(tan(x),x=Pi/2);lim
x
2
( )tan x undefined
> Limit(tan(x),x=Pi/2,right)=limit(tan(x),x=Pi/2,right);lim
+x
2
( )tan x
> Limit(tan(x),x=Pi/2,left)=limit(tan(x),x=Pi/2,left);
30
lim -x
2
( )tan x
plot(tan(x),x=-5..5,y=-10..10,color=black,thickness=3);
1.4. Calculating the derivatives Calculating the derivatives is one of the most widely used problems of
mathematical analysis.To solve it there exists the following function: diff(a,x1,x2,..., xn) ,
where a — differential algebraic expression or function, x1, x2,..., xn — a row of variables,where differentiation is carried out . Below there are given the examples of using the function differantion.
Calculating the derivatives of explicit functions:> restart: > with(linalg): with(plots): Warning, the protected names norm and trace have
been redefined and unprotected
Warning, the name changecoords has been redefined
> diff(sin(x),x);( )cos x
> Diff(sin(x),x)=diff(sin(x),x);31
ddx ( )sin x ( )cos x
To calculate the derivative from the function one can use the differential operator D. It enables to produce more compact expressions, than diff. > D(sin);
cos
> D(sin)(x);( )cos x
> y:=(x)->(x*sin(alpha)+cos(alpha))*(x*cos(alpha)-sin(alpha));
:= y x ( )x ( )sin ( )cos ( )x ( )cos ( )sin
> Diff(y(x),x)=diff(y(x),x) ;
x ( )( )x ( )sin ( )cos ( )x ( )cos ( )sin
( )sin ( )x ( )cos ( )sin ( )x ( )sin ( )cos ( )cos
> D(y);x ( )sin ( )x ( )cos ( )sin ( )x ( )sin ( )cos ( )cos
>
> restart: y:=x+x^x+x^(x^x);
:= y x xx x( )xx
> diff(y,x);
1 xx ( )( )ln x 1 x( )xx
xx ( )( )ln x 1 ( )ln x
xx
x
> diff(x^(1/x),x);
x
1x
( )ln xx2
1x2
> collect(%,1/x);
x
1x
( ) ( )ln x 1x2
32
restart; y:=x->floor(x)*sin(Pi*x)^2; # floor(x)-целая часть (Антье) числа;
:= y x ( )floor x ( )sin x 2
> diff(y(x),x);( )floor ,1 x ( )sin x 2 2 ( )floor x ( )sin x ( )cos x
> combine(%);
12 ( )floor ,1 x
12 ( )floor ,1 x ( )cos 2 x ( )floor x ( )sin 2 x
plot(%,x=-5..5,title="ГРАФИК ПРОИЗВОДНОЙ", titlefont=[HELVETICA,BOLD,8],thickness=3);
Calculating the derivative from piece- linear function is carried out in the following way:> restart:> y:=x->piecewise(x<1,1-x,x<=2,(1-x)*(2-x),-(2-x));"y(x)"=y(x);
:= y x ( )piecewise , , , ,x 1 1 x x 2 ( )1 x ( )2 x 2 x
"y(x)"
1 x x 1( )1 x ( )2 x x 2
2 x otherwise
> f:=x->diff(y(x),x);33
:= f x ( )diff ,( )y x x
> "y'(x)"=f(x);
"y'(x)"
-1 x 1 3 2 x x 2
1 2 x
plot([y(x),f(x)],x=-2..4,title="FUNCTION AND ITS DERIVATIVE",titlefont=[HELVETICA,8],color=[RED,BLUE],style=[PO INT,LINE],symbol=BO X,legend=["y(x)","y '(x)"],thickness=3);
Calculating derivative functions by the parameters:
> restart;> x:=t->exp(2*t)*cos(t)^2;
:= x t e( )2 t
( )cos t 2
> y:=t->exp(2*t)*sin(t)^2;
:= y t e( )2 t
( )sin t 2
> diff(y(t),t)/diff(x(t),t);
34
FUNCTION AND ITS DERIVATIVE
2 e( )2 t
( )sin t 2 2 e( )2 t
( )sin t ( )cos t
2 e( )2 t
( )cos t 2 2 e( )2 t
( )sin t ( )cos t
The derivative from the implicit function & its graphic expression:> > restart: with(plots):
> F:=x^2+2*x*y-y^2-2*x;
:= F x2 2 x y y2 2 x
implicitplot(F,x=-5..5,y=-
5..5,thickness=3,title="IMPLICIT FUNCTION",titlefont=[COURIER,BOLD,8]);
> F[1]:=implicitdiff(F,y,x);
:= F1x y 1 x y
plot3d(F[1],x=-5..5,y=-5..5,thickness=3,title="DERIVATIVE OF FUNCTION",titlefont=[COURIER,BOLD,4],axes=boxed);
35
IMPLICIT FUNCTION
DERIVATIVE OF FUNCTION
> Derivatives from higher orders :
> restart:> y:=x->x*sinh(x);
:= y x x ( )sinh x
> diff(y(x),x$100);100 ( )cosh x x ( )sinh x
> y1:=2*cos(5*t)+3*sin(9*t); := y1 2 ( )cos 5 t 3 ( )sin 9 t
> diff(y1,t$4);1250 ( )cos 5 t 19683 ( )sin 9 t
Quotient derivatives:> restart;> u:=(x,y)->x^4+y^4-4*x^2*y^2;
:= u ( ),x y x4 y4 4 x2 y2
> Diff(u(x,y),x)=diff(u(x,y),x);
x ( ) x4 y4 4 x2 y2 4 x3 8 x y2
> Diff(u(x,y),y)=diff(u(x,y),y);
y ( ) x4 y4 4 x2 y2 4 y3 8 x2 y
36
> Diff(u(x,y),x,y)=diff(u(x,y),x,y);
2
y x ( ) x4 y4 4 x2 y2 16 x y
> Diff(u(x,y),x$2)=diff(u(x,y),x$2);
2
x2 ( ) x4 y4 4 x2 y2 12 x2 8 y2
> Diff(u(x,y),y,y)=diff(u(x,y),y,y);
1.5. Integral calculus
Calculating indefinite & definite integrals is one of the most widely spread operations of mathematical analysis. To calculate these integrals the following functions are presented:
int(f,x), int(f,x = a..b), int(f,x = a..b,c),где f — subintegral function , x — a variable of integration, a, b — low & upper limits of integration, c — non-obligatory additional condition. Below the examples of using these functions for calculating various integrals are given.
Calculating indefinite integrals:> restart:>
Int(exp(alpha*x)*cos(b*x),x)=int(exp(alpha*x)*cos(b*x),x);
de
( ) x( )cos b x x
e( ) x
( )cos b x2 b2
b e( ) x
( )sin b x2 b2
37
> collect(%,exp); # Put beyond the bracket exp(x);
de
( ) x( )cos b x x
( )cos b x2 b2
b ( )sin b x2 b2 e
( ) x
> Seq:=f(x),x; # to the variable Seq sequences of 2 elements are given as the meaning -- the result of the operator”s F[ ] influence on the variable X f() & the influence of the variable x;
:= Seq ,( )f x x
> Int(Seq)=int(Seq);
d
( )f x x d
( )f x x
Finding the integrals of discount functions:> restart: with(plots):Warning, the name changecoords has been redefined> f:=(x)->piecewise(x<0,1,x<=1,x+1,2*x);
:= f x ( )piecewise , , , ,x 0 1 x 1 x 1 2 x
> f(x);
1 x 0x 1 x 12 x otherwise
> F:=x->int(f(x),x);
:= F x d
( )f x x
> F(x);
x x 0
12 x2 x x 1
x2 12 1 x
plot([f(x),F(x)],x=-1..2,color=[RED,NAVY],linestyle=[DOT,SOLID],thickness=2,title="КУСОЧНО-ГЛАДКАЯ ФУНКЦИЯ \n И ИНТЕГРАЛ ОТ НЕЕ",titlefont=[TIMES,BOLD,9],legend=["ФУНКЦИЯ","ИНТЕГРАЛ"]);
38
Calculating definite integrals:> restart:> Int(x^2*cos(x),x=0..2*Pi)=int(x^2*cos(x),x=0..2*Pi);
d
0
2
x2 ( )cos x x 4
> Int(1/((x^3+x^2+2*x+2)^2),x=0..1)=int(1/((x^3+x^2+2*x+2)^2),x=0..1); evalf(%);
d
0
1
1
( ) x3 x2 2 x 22 x
29 ( )ln 2
136
227 ( )ln 3
1216 2
arctan
22
0.1044615176 0.1044615176
> # Integral with a parameter;> s:=m->int(sin(x)^m,x=0..Pi/2);
:= s m d
0
2
( )sin x m x
> assume(m::integer>0); # Assume m>0 -integer;> s(m); # Г(x) - gamma-function of Euler;
39
12
12
m~2
1
m~2
Calculating non-personal integrals:> restart: with(plots):> y:=(x)->(x*ln(x))/(1+x^2)^2;
:= y xx ( )ln x
( )1 x22
> Int(y(x),x=0..infinity)=int(y(x),x=0..infinity);
d
0
x ( )ln x
( )1 x22 x 0
> evalf(%);-0.6696976039 10-17 0.
plot(y(x),x=0..infinity,title="Graph of function y(x)",titlefont=[HELVETICA,BOLD,10],thickness=3);
> Int(1/(x^2+1)^2,x=-infinity..infinity)=int(1/(x^2+1)^2,x=-infinity..infinity);
40
d
1
( )1 x22 x
2
Calculating double integrals:> restart: with(student):> Doubleint(x*y^2,y=x^2..x,x=0..1); # ATTENTION !! The
tasks for the limits of integration should be given in the following way ;
d
0
1
d
x2
x
x y2 y x
> value(%);140
> Int(Int(x*y*(x+y),y=0..x^3),x=0..2)=int(int(x*y*(x+y),y=0..x^3),x=0..2);
d0
2
d0
x3
x y ( )x y y x896099
> Int(Int(1/(x^2+y^2+5)^2,y=0..infinity),x=0..infinity);
d
0
d
0
1
( ) x2 y2 52 y x
> value(%);20
Calculating double integrals by transferring to polar coordinates:> restart: with(student):> A:=Doubleint(sqrt(x^2+y^2),x,y,Omega);
:= A d
d
x2 y2 x y
41
> # При переходе к полярным используем r и phi;> assume(r>0); # assume r>o;> changevar({x=r*cos(phi),y=r*sin(phi)},A,[r,phi]);#
chage variables;
d
d
r~2 r~
> # assume the field Omega;> Omega:=x^2+y^2<=a^2; x:=r*cos(phi);y:=r*sin(phi);
Omega;# Omega in polar coordinates; := x2 y2 a2
:= x r~ ( )cos
:= y r~ ( )sin
r~2 ( )cos 2 r~2 ( )sin 2 a2
> simplify(%);
r~2 a2
> Int(Int(r^2,r=0..a),phi=0..2*Pi); value(%);
d
0
2
d
0
a
r~2 r~
2 a3 3
42
1.6. Operations with rows Implementing the system of symbolic mathematics is particularly effective
for solving one of the problems of mathematical analysis –operations with rows .This section tackles the problems of analyzing numerical & functional rows,as well as dividing functions into Tailor & Fourier rows , asymptotic division.
Numerical sequences with a given number of members:> restart:with(plots):> sum(k^2,k=1..4);
30
> Sum(k^2,k=1..4)=evalf(sum(k^2,k=1..4));
k 1
4
k2 30.
> sum(k,k=1..n);
( )n 1 2
2n2
12
Infinite sequences:> restart:sum(-exp(-k),k=1..n);
e
( ) n 1
e( )-1
1
e( )-1
e( )-1
1
> sum(-exp(-k),k=1..infinity);
1
1 e
> Sum(k*a^k,k)=evalf(sum(k*a^k,k));
k
k ak ak ( ) k a 1. k 1. a( )a 1. 2
> Sum(1/n!,n=1..infinity)=evalf(sum(1/n!,n=1..infinity));
n 1
1!n 1.718281828
> Sum(n^2*exp(-sqrt(n)),n=1..5000)=evalf(sum(n^2*exp(-sqrt(n)),n=1..5000));
43
n 1
5000
n2 e( ) n
239.9949283
> Sum(n!/n^sqrt(n),n=1..1000)=evalf(sum(n!/n^sqrt(n),n=1..500));
n 1
1000 !n
n( )n
0.5453177346 101074
Calculating the factorial of number: 3!;
6
> factorial(50);30414093201713378043612608166064768844377641568960512000000000000
Double sums:> Sum(Sum(k^2,k=1..m),m=1..N);
m 1
N
k 1
m
k2
> factor(simplify(value(%)));N ( )N 2 ( )N 1 2
12
> subs(N=100,%);8670850
Calculating the products of member sequences:> restart:> Product(k^2,k=1..5)=product(k^2,k=1..5);
k 1
5
k2 14400
> Product(k^2,k)=product(k^2,k);
kk2 ( ) k 2
> product(a[k],k=1..6);a1 a2 a3 a4 a5 a6
44
> f:=[1,2,3,4,5]; product(f[k],k=1..5); := f [ ], , , ,1 2 3 4 5
120
> product(n+k,k=1..4); ( )n 1 ( )n 2 ( )n 3 ( )n 4
> Product(2/i,i=1..infinity)=product(2/i,i=1..infinity);
i 1
2i 0
The total scheme of analyzing the coincidence of numerical rows. Rows with constant signs:
> restart:with(linalg):> U:=(n)->(1/(ln(n)^2))*cos(Pi*n^2/(n+1));
:= U n
cos
n2
n 1( )ln n 2
> S:=Sum(U(n),n=2..infinity);
:= S n 2
cos
n2
n 1( )ln n 2
Checking the necessary condition of coincidence:> Limit(U(n),n=infinity)=limit(U(n),n=infinity);
limn
cos
n2
n 1( )ln n 2 0
To define the coincidence the Dalamber sign is used:> if limit(U(n+1)/U(n),n=infinity)<1 then print(R-
coincide) else print (R- not coincide) fi; R-not coincide
Rows of variables of signs:> restart:> V:=(n)-> (-1)^n*sin(n)^2/n;
45
:= V n( )-1 n ( )sin n 2
n
> S:=Sum(V(n),n=2..infinity);
:= S n 2
( )-1 n ( )sin n 2
n
Checking the necessary condition of coincidence:> Limit(V(n),n=infinity)=limit(V(n),n=infinity);
limn
( )-1 n ( )sin n 2
n 0
Drawing the graph of partial sums of a row :> H:=(k)->sum((-1)^n*sin(n)^2/n,n=1..k);
:= H k n 1
k ( )-1 n ( )sin n 2
n
> plot(H(k),k=1..400);
Drawing the graph of partial sums from modules:> G:=(k)->abs(H(k));
:= G k ( )H k
> plot(G(k),k=1..400);
46
Defining the sum of the row:> Sum((-1)^n*sin(n)^2/n,n=1..1000)=evalf(sum((-
1)^n*sin(n)^2/n,n=1..1000));
n 1
1000 ( )-1 n ( )sin n 2
n -0.3071095407
Degree rows:> restart:> a:=(n)->(n^n)/(n!);
:= a nnn
!n
> Sum(a(n)*x^n,n=1..infinity);
n 1
nn xn
!n
> R:=limit(a(n)/a(n+1),n=infinity); evalf(%); # field of coincidence -e^(-1) < x < e^(-1);
:= R e( )-1
0.3678794412
Diving functions into Tailor rows: The function of one variable:> restart: with(plots):with(linalg):> # Dividing into Tailor row to member с x^4 of
function f(x); > f:=(1+x+x^2)/(1-x+x^2);
47
:= f1 x x2
1 x x2
> taylor(f,x=0); 1 2 x 2 x2 2 x4 2 x5 ( )O x6
> # Dividing x=0 to the order of the remainder = 5(non obligatory parameter);
> taylor(f,x=0,5);f1:=convert(%,polynom);f1; 1 2 x 2 x2 2 x4 ( )O x5
:= f1 1 2 x 2 x2 2 x4
1 2 x 2 x2 2 x4
> f1:=convert(%,polynome);# f1- the main part of the row := f1 1 2 x 2 x2 2 x4
> # Let’s analyse how the initial function differs from its approximation by Tailor row;
> plot([f,f1],x=-1..1.2,color=[BLUE,PINK],linestyle=[SOLID,DASHDOT],title="Функция и ее ряд Тейлора",titlefont=[HELVETICA,BOLD,10],legend=["функция","ряд Тейлора"],thickness=3);
Function from 2 variables:> restart:
48
> mtaylor(f(x,y),[x,y],3):> mtaylor(sin(x^2+y^2),[x,y]);
x2 y2
> mtaylor(sin(x^2+y^2),[x,y],8);
x2 y2 16 x6 1
2 y2 x4 12 y4 x2 1
6 y6
> mtaylor(sin(x^2+y^2),[x,y],8,[2,1]);
y2 x2 16 y6
> mtaylor(sin(x^2+y^2),[x=1,y],3); ( )sin 1 2 ( )cos 1 ( )x 1 ( ) 2 ( )sin 1 ( )cos 1 ( )x 1 2 ( )cos 1 y2
x y 1x2
2 x ( )y 1( )y 1 2
2x3
3 ( )y 1 x2 x ( )y 1 2 ( )y 1 3
3
Asymtotic division of functions> restart:with(linalg): with(plots):Warning, the protected names norm and trace have been
redefined and unprotected
Warning, the name changecoords has been redefined
> y[1]:=1/(1-x-x^2);
:= y11
1 x x2
> asympt(y[1],x);
1x2
1x3
2x4
3x5
O
1x6
> y[2]:=evalf(convert(%,polynomial));
:= y2 1.x2
1x3
2.x4
3.x5
> # Let’s define how the initial function differs from its asymptotic approximation;
> plot([y[1],y[2]],x=1..10,color=[BLUE,RED],linestyle=[
49
SOLID,DASHDOT],title="The function& its approximation",titlefont=[HELVETICA,BOLD,12],legend=["function"appriximation"],thickness=3);
Dividing the function into Fourier row:
Method 1> > # Expansion into Fourie row of function
y(x)=abs(1-x) on the interval (-1,1);> restart;> with(linalg): with(plots):Warning, the protected names norm and trace have
been redefined and unprotected
Warning, the name changecoords has been redefined> y := x -> abs(1 - x);
:= y x 1 x
> # Let’s assume integer conditions on variables n и k;> assume(n, integer); assume(k, integer);> l := 2;
:= l 2
> # Calculate Fourier coefficients; > a[0] := 1/2/l*int(y(x), x = -l..l);
:= a054
50
> a[n] := n -> 1/l*int(y(x)*cos(n*Pi*x/l), x = -l..l);
:= an~ n1l d
l
l
( )y x
cos
n xl x
> a[n](n);
4
( )-1 n~
cos
n~ 2
n~2 2
> b[n] := n -> (1/l)*int(y(x)*sin(n*Pi*x/l), x = -l..l);
:= bn~ n1l d
l
l
( )y x
sin
n xl x
> b[n](n);
2
( )-1 n~ n~ 2
sin
n~ 2
n~2 2
> F := (x, k) -> a[0] + sum(a[n](n)*cos(n*Pi*x/l) + b[n](n)*sin(n*Pi*x/l), n = 1..k);
:= F ( ),x k a0
n 1
k
( )an n
cos
n xl ( )bn n
sin
n xl
> F(x, infinity);
54
n~ 1
4
( )-1 n~
cos
n~ 2
cos
n~ x2
n~2 2
2
( )-1 n~ n~ 2
sin
n~ 2
sin
n~ x2
n~2 2
> # Compare:; > plot([y(x),F(x,20)],x=-
2..2,color=[BLUE,RED],linestyle=[SOLID,DASHDOT],title="function & its approximation",titlefont=[HELVETICA,BOLD,12],legend=["function ","approxomation"],thickness=3);
51
52
1.7. Solving equations, inequalities & their systems
Solving linear & non- linear equations & inequalities is one of the main fields of mathematical analysis. To solve the mentioned above type of equations a universal & flexible function is used(eqn, var) or
solve({eqn1,eqn2.....},{var1,var2....}) ,where eqn is the equation , containing the function of several variables , var — variable ,to which the solution is found.If on writing eqn the sign of equality or ratio signs are not used,it is considered < solve> looks for roots of equation . For getting the numerical solution of non-linear equation or the system of non-linear equations in terms of material numbers it is convenient to use the function fsolve(eqns, vars, options). Sometimes it is reasonable to use other modifications of the function< solve>; rsolve — to solve recurrent equations, isolve — to solve integer equations, msolve — for solving by modules <m> & others.
> Solving non-linear equations :
> restart;with(linalg):with(plots):
> f:=(2*x^2+3*x+1)*(3*x+1)=8*x^4; := f ( ) 2 x2 3 x 1 ( )3 x 1 8 x4
> fsolve(f,x);,-0.2807764064 1.780776406
> fsolve(f,x,complex);-0.3750000000 0.3307189139 I -0.3750000000 0.3307189139 I -0.2807764064, , ,
1.780776406
> solve(f,x);
, , ,34
174
34
174
38
18 I 7
38
18 I 7
> evalf(%);1.780776406 -0.2807764060 -0.3750000000 0.3307189139 I, , ,
-0.3750000000 0.3307189139 I
> fsolve(x^5-x,x,complex);, , , ,-1.000000000 -1.000000000 I 0. 1.000000000 I 1.000000000
> AA:=fsolve(2*x+(x+2)^2+(x^3-2*x)=0,x,complex);53
:= AA , ,-1. -2. I 2. I
> # Assuming of the received values of roots for their further analysis is carried out in the following way;
> AA[1];AA[2];AA[3];-1.
-2. I
2. I
Solving transcendental equations:
> restart;> f1:=sin(x); f2:=cos(x)-1;G1:=f1-f2; s:=fsolve(G1,x);
:= f1 ( )sin x
:= f2 ( )cos x 1
:= G1 ( )sin x ( )cos x 1
:= s 0.
> fsolve(sin(x)=Pi/4,x,complex);
0.9033391108
> A:=solve(a*x^2+b*x+c,x):> A[1];
b b2 4 a c2 a
> A[2];
b b2 4 a c
2 a
> BB:=evalf(solve(a*x^3+b*x^2+c*x+d,x)):> x[1]:=BB[1];
x1 0.1666666667 36. c b a 108. d a2 8. b3 ( :=
20.78460970 4. a c3 1. c2 b2 18. c b a d 27. d2 a2 4. d b3 a )( )/1 3
a/ 0.6666666667 ( )3. a c 1. b2 a 36. c b a 108. d a2 8. b3 ((
20.78460970 4. a c3 1. c2 b2 18. c b a d 27. d2 a2 4. d b3 a )( )/1 3
)0.3333333333 b
a
54
> x[2]:=BB[2];x2 0.08333333333 36. c b a 108. d a2 8. b3 ( :=
20.78460970 4. a c3 1. c2 b2 18. c b a d 27. d2 a2 4. d b3 a )( )/1 3
a/ 0.3333333333 ( )3. a c 1. b2 a 36. c b a 108. d a2 8. b3 ((
20.78460970 4. a c3 1. c2 b2 18. c b a d 27. d2 a2 4. d b3 a )( )/1 3
)0.3333333333 b
a 0.8660254040 I 0.1666666667 36. c b a 108. d a2 8. b3 ((
20.78460970 4. a c3 1. c2 b2 18. c b a d 27. d2 a2 4. d b3 a )( )/1 3
a/
0.6666666667 ( )3. a c 1. b2 a 36. c b a 108. d a2 8. b3 ((
20.78460970 4. a c3 1. c2 b2 18. c b a d 27. d2 a2 4. d b3 a )( )/1 3
) )
> x[3]:=BB[3];
x3 0.08333333333 36. c b a 108. d a2 8. b3 ( :=
20.78460970 4. a c3 1. c2 b2 18. c b a d 27. d2 a2 4. d b3 a )( )/1 3
a/ 0.3333333333 ( )3. a c 1. b2 a 36. c b a 108. d a2 8. b3 ((
20.78460970 4. a c3 1. c2 b2 18. c b a d 27. d2 a2 4. d b3 a )( )/1 3
)0.3333333333 b
a 0.8660254040 I 0.1666666667 36. c b a 108. d a2 8. b3 ((
20.78460970 4. a c3 1. c2 b2 18. c b a d 27. d2 a2 4. d b3 a )( )/1 3
a/
0.6666666667 ( )3. a c 1. b2 a 36. c b a 108. d a2 8. b3 ((
20.78460970 4. a c3 1. c2 b2 18. c b a d 27. d2 a2 4. d b3 a )( )/1 3
) )
> Solving systems of linear equations:
> restart: with(linalg): with(plots):> sys:={3*x+5*y=15,y=x-1};
:= sys { },3 x 5 y 15 y x 1
> sols:=solve(sys,{x,y});sols[1];sols[2];
:= sols { },y32 x
52
y32
55
x52
> # 8951Assuming the received meanings of the solution is carried out in the following way :
> x2:=rhs(sols[2]);# right-hand side ( := x2
52
> y2:=rhs(sols[1]); := y2
32
> # or using the operator assign:;> assign(sols);x;y;
52
32
> # C := y1
32
> implicitplot(sys,x=-10..10,y=-10..10,thickness=3,color=blue);
> restart: with(plots):
> sys:={3*x-3*y=10,2*x+y=7,y=2*x+z+4}; := sys { }, ,3 x 3 y 10 2 x y 7 y 2 x z 4
> sols:=solve(sys,{x,y,z});
:= sols { }, ,z-979 x
319 y
19
> # Checking the correctness of the received solution;> subs(sols,sys);
{ }, ,10 10 7 7 19
19
> x2:=subs(sols,x); := x2
319
> y2:=subs(sols,y);56
:= y219
> z2:=subs(sols,z); := z2
-979
> implicitplot3d(sys,x=-10..10,y=-10..10,z=-15..0,style=patchcontour,orientation=[-25,30]);
Solving systems of non-linear & transcendental equations:
> restart; > solve({x*y=a,x+y=b},{x,y});
{ },y ( )RootOf _Z2 _Z b a x ( )RootOf _Z2 _Z b a b
> allvalues(%);
,{ },y b2
b2 4 a2 x
b2
b2 4 a2 { },y
b2
b2 4 a2 x
b2
b2 4 a2
> restart: with(plots):Warning, the name changecoords has been redefined
> z1:=2*x+4*y-6; := z1 2 x 4 y 6
> z2:=y+(1/x)-1; := z2 y
1x 1
57
> eqs:={z1,z2}; := eqs { }, 2 x 4 y 6 y
1x 1
> r:=solve(eqs,[x,y]);
:= r
,[ ],x -1 y 2
,x 2 y
12
> # Checking the correctness of the received solution;> eval(eqs,r[1]);
{ }0
> eval(eqs,r[2]);{ }0
> implicitplot(eqs,x=-10..10,y=-10..10,thickness=3,color=blue);
> # Solving the system of non-linear equations{x^2-y^2=1,x^2+xy=2};
> eqq:={x^2-y^2=1,x^2+x*y=2}; := eqq { },x2 y2 1 x2 y x 2
> _EnvExplicit:=true; := _EnvExplicit true
> ss:=solve(eqq,{x,y});
:= ss ,{ },x2 3
3 y3
3 { },x 2 3
3 y 3
3
> simplify(ss[1]);
{ },x2 3
3 y33
58
> simplify(ss[2]);
{ },x 2 3
3 y 33
> # Solution of trigonometrical equation {5sin(x)+12cos(x)=13};
> _EnvAllSolutions:=true:> solve(5*sin(x)+12*cos(x)=13,x);
,
arctan
512 2 _Z1~
arctan
512 2 _Z2~
> evalf(%);,0.3947911197 6.283185308 _Z1~ 0.3947911197 6.283185308 _Z2~
Solving inequalities:> restart:> solve(5*x>0,x);
( )RealRange ,( )Open 0
> solve(5*x>=10,x);( )RealRange ,2
> solve(a*x>b,{x});{ } ( )signum a x
( )signum a ba
> restart:> eqns:=abs(z)^2/(z+1)<exp(2)/(exp(1)-1);
:= eqns z 2
z 1e2
e 1
> AA:=solve(eqns,{z});
:= AA ,
,z12
e2 ( )e22
4 e2 e 4 e2
e 1 12
e2 ( )e22
4 e2 e 4 e2
e 1 z { }z -1
> evalf(AA);,{ },z 5.137320995 -0.8370624580 z { }z -1.
> restart:> eqns:=exp(x)*x^2>=1/2;
:= eqns 12 ex x2
> SS:=solve(eqns,{x});
59
:= SS ,{ },2
LambertW ,-1
24 x x 2
LambertW
24 { }2
LambertW
24 x
> evalf(SS);,{ },-2.617866616 x x -1.487962064 { }0.5398352768 x
> restart:> eqns:=abs((z+abs(z+2))^2-1)^2=9;
:= eqns ( )z z 2 2 12
9
> solve(eqns,{z});,{ }z 0 { }z -2
Solving the inequality systems:
> eqns:={x^2<=1,y^2<=1,x+y<1/2};
:= eqns { }, ,y2 1 x y12 x2 1
> solve(eqns,{x,y});
{ }, , , ,x y12 -1 x x 1 -1 y y 1
> solve({x*y*z>0,x>-1,y+z>10},{x,y,z});,{ }, ,z 0 10 y -1 x { }, ,10 z y 0 -1 x
> {z = 0, 10 < y, -1 < x}, {10 < z, y = 0, -1 < x};,{ }, ,z 0 10 y -1 x { }, ,10 z -1 x y 0
> # Representing the fields,presented by inequality systems;
> restart:> with(plots):
> inequal({x+y>-1,x-y<=1,y<=2+0.1*x},x=-4..4,y=-4..4,optionsfeasible=(color=magenta),optionsopen=(color=blue,thickness=2),optionsclosed=(color=black,thickness=3),optionsexcluded=(color=yellow));
60
> > inequal({0<y,y<4,y/2+1<x,x<7-y},x=-
4..10,y=0..4,optionsfeasible=(color=magenta),optionsopen=(color=blue,thickness=2),optionsclosed=(color=black,thickness=3),optionsexcluded=(color=yellow));
61
1.8. The analysis of functions
While writing course, diploma & research papers one is bound to analyze functions’behaviour. In some cases it is a complicated & labour-consuming procedure. It is possible to automatize this process by the given below functions. Searching the extremes of functions > restart: with(plots):with(linalg):
> # Let’s use the function extrema(expr,constrs,vars,'s'), where expr - type of function, constr - constraints,vars- arguments of the function, s – found absciss of extremum point;
> y:=(x)->a*x^2+b*x+c; := y x a x2 b x c
> extrema(y(x),{},x,'s');# in case of no limitations empty list is written {};
{ } b2 4 c a
4 a
> s;subs(x=s,y(x));{ }{ }x
b2 a
a { }{ }x b
2 a
2
b { }{ }x b
2 a c
> > extrema(x*exp(-x),{},x,'s');evalf(%);
{ }e( )-1
{ }0.3678794412
> s;{ }{ }x 1
> plot(x*exp(-x),x=0..3);
62
> evalf(extrema(sin(x)^2,{},x,'s'));s;{ },0. 1.
{ },{ }x2 { }x 0
> plot(sin(x)^2,x=-Pi..Pi);
Searching the minimum & maximum of 2 variables:
> restart: with(plots):> z[1]:=(x,y)->x^2-3*x+y^2+3*y+3;
:= z1 ( ),x y x2 3 x y2 3 y 3
> minimize(z[1](x,y));-32
> minimize(z[1](x,y),location);
63
,-32 { }
,{ },x
32 y
-32
-32
> plot3d(z[1](x,y),x=-5..5,y=-5..5,color=blue,thickness=1,axes=boxed);
> z[2]:=(x,y)->sin(y)*exp(-x); := z2 ( ),x y ( )sin y e
( ) x
> maximize(z[2](x,y));
> maximize(z[2](x,y),location);
, { }
,{ },y
12 2 _Z3 x
> maximize(z[2](x,y),x=-10..10,y=-10..10,location);
,e10 { }, ,
,{ },x -10 y
5 2 e10
,{ },y
2 x -10 e10
,{ },x -10 y
3 2 e10
> evalf(%);22026.46579 [ ],{ },x -10. y 7.853981635 22026.46579 ,{,
[ ],{ },x -10. y 1.570796327 22026.46579 ,[ ],{ },x -10. y -4.712388981 22026.46579 }
> plot3d(z[2](x,y),x=-10..10,y=-10..10,color=blue,thickness=1,axes=boxed);
64
Analysis of functions for continuity & singularity:
> restart:> iscont(1/x^2,x=-1..1);# is function continuity ?;
false
cont
> iscont(1/x^2,x=0..1);true
> iscont(1/x^2,x=0..1,'closed');false
> iscont(1/x^2,x=-1..1,'closed');false
> iscont(1/(x+2),x=-1..1);true
> singular(ln(x)/(x^2-x));,{ }x 0 { }x 1
> singular(tan(x));evalf(%);{ }x _Z1~
12
{ }x 3.141592654 _Z1~ 1.570796327
> singular(1/sin(x));evalf(%);{ }x _Z2~
{ }x 3.141592654 _Z2~
> singular(x+y+1/x,{x,y});, , , ,{ },x 0 y y { },x y y { },x y y { },y x x { },y x x
Operations with polynomials:
65
> # Defining the coefficient of polynomial p(x);> restart:> p:=a[4]*x^4+a[3]*x^3+a[2]*x^2+a[1]*x+a[0];
:= p a4 x4 a3 x3 a2 x2 a1 x a0
> coeff(p,x);# Defining the coefficient with x^1;a1
> coeff(p,x^3); coeff(p,x,3); # Defining the coefficient with x^3;
a3
a3
> coeffs(p,x);# Defining all coefficients in terms of raising the degree;
, , , ,a0 a1 a4 a3 a2
> collect(p,x); a4 x4 a3 x3 a2 x2 a1 x a0
> # Defining coefficient of polynomial q(x,t);> q:=x^2+2*(t^2)+3*x+4*t+5;
:= q x2 2 t2 3 x 4 t 5
> coeffs(q);, , , ,5 3 4 1 2
> coeffs(q,t);, , x2 3 x 5 4 2
> collect(q,x); x2 2 t2 3 x 4 t 5
> collect(q,x,t); ( )t 1 x2 ( )t 3 x ( )t 5 2 t2 4 t
> # Defining coefficients of polynomials by degrees;> restart:> q:=1/x^2+2/x+3+4*x+5*x^2;
:= q 1x2
2x 3 4 x 5 x2
> lcoeff(q,x);# coefficient with senior degree x;66
5
> lcoeff(q,x,'t'); t;5
x2
> coeffs(q,x,'t');t;, , , ,3 1 4 5 2
, , , ,11x2 x x2 1
x
> > p:=a[4]*x^4+a[3]*x^3+a[2]*x^2+a[1]*x+a[0];
:= p a4 x4 a3 x3 a2 x2 a1 x a0
> degree(p,x);# higher degree of polynomial4
> ldegree(p,x);# lower degree of polynomial;0
> # expanding polynomial into degrees; > restart:> evala(AFactor(2*x^2+4*x-6));
2 ( )x 3 ( )x 1
> evala(AFactor(x^2+2*y^2));( )x ( )RootOf _Z2 2 y ( )x ( )RootOf _Z2 2 y
> expand((x-1)*(x-2)*(x-3)*(x-4)); x4 10 x3 35 x2 50 x 24
> AFactor(%);( )AFactor x4 10 x3 35 x2 50 x 24
> evala(%);( )x 1 ( )x 2 ( )x 3 ( )x 4
> expand((x-1+I+2)*(x+1-I*2)*(x-3)); x3 x2 3 x x2 I 2 I x 9 3 I
> evala(AFactor(x^2-2*y^2));( )x ( )RootOf _Z2 2 y ( )x ( )RootOf _Z2 2 y
> # defining the roots of polynomial;67
> restart:> p:=x^4+9*x^3+31*x^2+59*x+60;
:= p x4 9 x3 31 x2 59 x 60
> solve(p,x);# all roots of polynomial;, , ,-3 -4 -1 2 I -1 2 I
> roots(p,x);# material roots of polynomial in terms of divisibility;
[ ],[ ],-4 1 [ ],-3 1
> expand((x-1)*(x-2)*(x-3)*(x-4)); x4 10 x3 35 x2 50 x 24
> roots(%,x);[ ], , ,[ ],1 1 [ ],2 1 [ ],3 1 [ ],4 1
> # main operations with polynomials;> restart:> readlib(psqrt);# including libraries proc( ) ... end procp
> readlib(proot);proc( ) ... end proc,p r
> psqrt(x^2+2*x*y+y^2); # square root from the expression in the function psqrt;
x y
> proot(x^3+3*x^2+3*x+1,3); # cube root from the expression in the function proot;
x 1
> psqrt(x+y);_NOSQRT
> proot(x+y,3);_NOROOT
> p1:=a1*x^3+b1*x^2+c1*x+d1; := p1 a1 x3 b1 x2 c1 x d1
> p2:=a2*x^3+b2*x^2+c2*x+d2; := p2 a2 x3 b2 x2 c2 x d2
> p1+p2;# sum of polynomials a1 x3 b1 x2 c1 x d1 a2 x3 b2 x2 c2 x d2
68
> p1*p2;# producing polynomials;( ) a1 x3 b1 x2 c1 x d1 ( ) a2 x3 b2 x2 c2 x d2
> collect(%,x);# ordering polynomials in terms of decreasing degrees x;
a1 a2 x6 ( )b1 a2 a1 b2 x5 ( ) c1 a2 b1 b2 a1 c2 x4
( ) d1 a2 c1 b2 b1 c2 a1 d2 x3 ( ) d1 b2 c1 c2 b1 d2 x2 ( )d1 c2 c1 d2 x d1 d2
> p3:=p1/p2; # dividing polynomials;
:= p3 a1 x3 b1 x2 c1 x d1 a2 x3 b2 x2 c2 x d2
> expand(%,x);a1 x3
a2 x3 b2 x2 c2 x d2b1 x2
a2 x3 b2 x2 c2 x d2c1 x
a2 x3 b2 x2 c2 x d2
d1 a2 x3 b2 x2 c2 x d2
> normal(%);# normalizing the fraction; a1 x3 b1 x2 c1 x d1 a2 x3 b2 x2 c2 x d2
> diff(p1,x);# derivative from polynomial; 3 a1 x2 2 b1 x c1
> diff(p1,x$2);6 a1 x 2 b1
> Int(p1,x)=int(p1,x);# indefinite integral from polynomial;
d a1 x3 b1 x2 c1 x d1 x
a1 x4
4b1 x3
3c1 x2
2 d1 x
> Int(p1,x=0..1)=int(p1,x=0..1); # definite integral from polynomial;
d
0
1
a1 x3 b1 x2 c1 x d1 x a14
b13
c12 d1
> p3;
69
a1 x3 b1 x2 c1 x d1 a2 x3 b2 x2 c2 x d2
> denom(p3);# denominator of the fraction; a2 x3 b2 x2 c2 x d2
> numer(p3); # numerator of the fraction; a1 x3 b1 x2 c1 x d1
> collect(denom(p3),x); a2 x3 b2 x2 c2 x d2
> collect(numer(p3),x);For multipliers of polynomial;> restart:> p:=x^4+4;
:= p x4 4
> factor(p); a1 x3 b1 x2 c1 x d1
> # division( ) x2 2 x 2 ( ) x2 2 x 2
> factor(p,complex);( )x 1. 1. I ( )x 1. 1. I ( )x 1. 1. I ( )x 1. 1. I
> factor(x^5-6*x^4+9*x^3-6*x^2+8*x,complex);( )x 1. I x ( )x 1. I ( )x 2. ( )x 4.
> ifactor(453);( ) 3 ( ) 151
# the least common divisor of 2 polynomials> s[1]:=x^2-x*sqrt(3)-sqrt(2)*x+sqrt(6);
:= s1 x2 x 3 2 x 6
> s[2]:=x^2-2; := s2 x2 2
> gcd(s[1],s[2]);# of 2 polynomialsв;x 2
70
1.9. Solving differential equations & their systems
Differential equations is the basis of mathematical modelling of different by their nature dynamic systems & processes. The current section tackles the functions, enabling to solve linear & non- linear differential equations & their systems analytically & numerically.Ordinary differential equations ,systems of equations & equations in quotient derivatives.To solve the system of differential equations < Cauchy problem>the function <dsolve> in different forms is used.
dsolve(ode); dsolve(ode, y(x), extra_args); dsolve({ode,ics}, y(x), extra_args); dsolve({sysode,ics}, {funcs}, extra_args),
where < ode> — ordinary differential equation or the system of equations, y(x) — unknown function of one variable ics — expression for initial conditions, {sysode} — quantity of differential equations <system>, {funcs} — quantity of determinant functions , extra_args — option,defining the type of solution.Parameter< extra_args> can have the following meanings: exact — аnalytical solution < accepted a priori>explicit , system — solving the system of differential equations, formal series — solution in terms of power polynomial, series — solution in terms of series, numeric — numerical solution. A priori function < dsolve> chooses the most suitable method for solving
71
differential equations automatically.However in function parameters <dsolve>the preferable method of solving differential equations can be given in brackets.The following methods are allowed :quadrature, linear, Bernoulli, inverse_linear, separable, homogeneous, Chini, lin_sym, exact, Abel, pot_sym.
Solving ordinary differential equations of the first order:
> restart:with(linalg):with(DEtools):with(plots):
> > dsolve(diff(y(x),x)-a*x=0,y(x));
( )y x a x2
2 _C1
> dsolve(diff(y(x),x)-y(x)=exp(-x),y(x));
( )y x
12 e
( ) 2 x_C1 ex
> dsolve(diff(y(x),x)-y(x)=sin(x)*x,y(x));
( )y x 12 ( )cos x x
12 ( )cos x
12 ( )sin x x ex _C1
> ode_L:=sin(x)*diff(y(x),x)-cos(x)*y(x)=0;
:= ode_L ( )sin x
d
dx ( )y x ( )cos x ( )y x 0
> dsolve(ode_L,[linear],useInt);
( )y x _C1 e
d
( )cos x( )sin x
x
> value(%);( )y x _C1 ( )sin x
> dsolve(ode_L,[separable],useInt);
d
( )cos x( )sin x x d
( )y x
1_a _a _C1 0
> value(%); ( )ln ( )sin x ( )ln ( )y x _C1 0
72
> mu:=intfactor(ode_L); :=
1( )sin x 2
> dsolve(mu*ode_L,[exact],useInt);
G ( )y x _C1 ( )sin x
> # Graphic solution of differential equation,usage OF THE FUNCTION odeplot PACKAGE plots;
> > restart:with(plots):
> P:=dsolve({diff(y(x),x)=cos(x^2*y(x)),y(0)=2},y(x),type=numeric);
:= P proc( ) ... end procx_rkf45
> odeplot(P,[x,y(x)],-15..15,labels=[x,y],color=black,thickness=2);
> Solving differential equations of the second order:
> restart:> od1:=diff(y(x),x$2)-diff(y(x),x)=sin(x);
:= od1
d
d2
x2 ( )y x
d
dx ( )y x ( )sin x
> dsolve({od1},y(x));
{ }( )y x 12 ( )sin x
12 ( )cos x ex _C1 _C2
73
> dsolve({diff(y(x),x$2)-diff(y(x),x)=sin(x)},y(x));
{ }( )y x 12 ( )sin x
12 ( )cos x ex _C1 _C2
> dsolve({diff(y(x),x$2)-diff(y(x),x)=sin(x),y(0)=0,D(y)(0)=11},y(x));# equation with initial conditions;
( )y x 12 ( )sin x
12 ( )cos x
232 ex 12
> y(x):=rhs(%); := ( )y x
12 ( )sin x
12 ( )cos x
232 ex 12
> y(x);
12 ( )sin x
12 ( )cos x
232 ex 12
> restart:> od2:=m*diff(y(x),x$2)-k*diff(y(x),x);
:= od2 m
d
d2
x2 ( )y x k
d
dx ( )y x
> yxo:=y(0)=0,D(y)(0)=1; # Assuming initial conditions;
:= yxo ,( )y 0 0 ( )( )D y 0 1
> dsolve({od2,yxo},y(x));
( )y x mk
m e
k xm
k
Solving the systems of differential equations <explicitly ,in series ,using Laplace transformations>:
> restart:> sys:=diff(y(x),x)=2*z(x)-y(x)-
x,diff(z(x),x)=y(x);
:= sys ,ddx ( )y x 2 ( )z x ( )y x x d
dx ( )z x ( )y x
> fncs:={y(x),z(x)}; := fncs { },( )y x ( )z x
74
> A:=dsolve({sys,y(0)=0,z(0)=1},fncs); # solving the system of equations explicitly (exact);
:= A { },( )z x 512 e
( ) 2 x 13 ex 1
4x2 ( )y x
56 e
( ) 2 x 13 ex 1
2
> A[1];( )z x
512 e
( ) 2 x 13 ex 1
4x2
> z(x):=rhs(%); := ( )z x
512 e
( ) 2 x 13 ex 1
4x2
> A[2];
512 e
( ) 2 x 13 ex 1
4x2
512 e
( ) 2 x 13 ex 1
4x2
> y(x):=rhs(%); := ( )y x
512 e
( ) 2 x 13 ex 1
4x2
> restart:> sys:=diff(y(x),x)=2*z(x)-y(x)-
x,diff(z(x),x)=y(x);
:= sys ,ddx ( )y x 2 ( )z x ( )y x x d
dx ( )z x ( )y x
> fncs:={y(x),z(x)}; := fncs { },( )y x ( )z x
> B:=dsolve({sys,y(0)=0,z(0)=1},fncs,series); # solving the system of equations in terms of row;
B ( )y x 2 x32 x2 7
6 x3 1324 x4 9
40 x5 ( )O x6 ,{ :=
( )z x 1 x2 12 x3 7
24 x4 13120 x5 ( )O x6 }
> y(x):=rhs(B[1]);
:= ( )y x 2 x32 x2 7
6 x3 1324 x4 9
40 x5 ( )O x6
> z(x):=rhs(B[2]);
:= ( )z x 2 x32 x2 7
6 x3 1324 x4 9
40 x5 ( )O x6
75
> restart:> sys:=diff(y(x),x)=2*z(x)-y(x)-
x,diff(z(x),x)=y(x);
:= sys ,ddx ( )y x 2 ( )z x ( )y x x d
dx ( )z x ( )y x
> fncs:={y(x),z(x)}; := fncs { },( )y x ( )z x
> Order:=8;# assume the order of approximation by row (a priori 6);
:= Order 8
> B:=dsolve({sys,y(0)=0,z(0)=1},fncs,series);
B ( )y x 2 x32 x2 7
6 x3 1324 x4 9
40 x5 53720 x6 107
5040 x7 ( )O x8 ,{ :=
( )z x 1 x2 12 x3 7
24 x4 13120 x5 3
80 x6 535040 x7 ( )O x8 }
> y(x):=rhs(B[1]); := ( )y x 2 x
32 x2 7
6 x3 1324 x4 9
40 x5 53720 x6 107
5040 x7 ( )O x8
> z(x):=rhs(B[2]);
:= ( )z x 2 x32 x2 7
6 x3 1324 x4 9
40 x5 53720 x6 107
5040 x7 ( )O x8
> restart:
> sys:=diff(y(x),x)=2*z(x)-y(x)-x,diff(z(x),x)=y(x);
:= sys ,ddx ( )y x 2 ( )z x ( )y x x d
dx ( )z x ( )y x
> fncs:={y(x),z(x)}; := fncs { },( )y x ( )z x
>
> dsolve({sys,y(0)=0,z(0)=1},fncs,method=laplace);# solving the system of equations ,using Laplace approximation;
76
{ },( )y x 56 e
( ) 2 x 12
13 ex ( )z x
512 e
( ) 2 x x2
14
13 ex
Numerical solution of the system of differential equations:
> restart:
> sys:=diff(y(x),x)=2*z(x)-y(x)-
x,diff(z(x),x)=y(x);
:= sys ,ddx ( )y x 2 ( )z x ( )y x x d
dx ( )z x ( )y x
> fncs:={y(x),z(x)};
:= fncs { },( )y x ( )z x
> F:=dsolve({sys,y(0)=0,z(0)=1},fncs,numeric); #
solving the equation by the method of
Runge,Kutt,Felberg := F proc( ) ... end procx_rkf45
> F(2);
[ ], ,x 2. ( )y x 2.94775576123128014 ( )z x 3.72064997248744600
plots[odeplot](F,
[x,y(x)],0..2.5,labels=[x,y],color=red); # drawing
the graph y(x) of solution;
77
> plots[odeplot](F,[x,z(x)],0..2.5,labels=[x,z],color=red); # drawing the graph of the solution z(x) ;
> restart:with(plots):
> sys:=diff(y(x),x)=z(x),diff(z(x),x)=3*sin(y(x));
:= sys ,ddx ( )y x ( )z x d
dx ( )z x 3 ( )sin ( )y x
> fncs:={y(x),z(x)}; := fncs { },( )y x ( )z x
> P:=dsolve({sys,y(0)=0,z(0)=1},fncs,type=numeric); := P proc( ) ... end procx_rkf45
78
> odeplot(P,[[x,y(x)],[x,z(x)]],-4..4,numpoints=25,color=red,thickness=2);# drawing graphs y(x) и z(x) in one axis;
Solving the system of 2 differential equations with the phase portrait of the solution:
> restart:with(plots):
> sys:=diff(y(x),x)=z(x),diff(z(x),x)=3*sin(y(x));> fncs:={y(x),z(x)};
:= sys ,ddx ( )y x ( )z x d
dx ( )z x 3 ( )sin ( )y x
:= fncs { },( )y x ( )z x
> P:=dsolve({sys,y(0)=0,z(0)=1},fncs,type=numeric); := P proc( ) ... end procx_rkf45
odeplot(P,[y(x),z(x)],-4..4,numpoints=150,color=red,thickness=2);
79
Solving differential equations with piece – linear functions:
> restart:>
eq:=diff(y(x),x)+piecewise(x<x^2-3,exp(x/2))*y(x);
:= eq
d
dx ( )y x
e
x2
x x2 30 otherwise
( )y x
> dsolve(eq,y(x));
( )y x
_C1 e
2 e
x2
x 12
132
_C1 e
2 e
/1 4
134
x 12
132
_C1 e
2 e
/1 4
134
2 e
x2
2 e
/1 4
134
12
132 x
Harmonious oscillator:
> restart:> F:=(t)->A*sin(nu*t);
:= F t A ( )sin t
> ode:=diff(q(t),t$2)+2*delta*diff(q(t),t)+omega[0]^2*q(t)=F(t)/m;
80
:= ode
d
d2
t2 ( )q t 2
d
dt ( )q t 0
2( )q t
A ( )sin tm
> m:=3; delta:=0.1; omega[0]:=150; A:=20; nu:=2;# Assuming the parameters of the system;
:= m 3 := 0.1
:= 0 150
:= A 20
:= 2
> yx0:=q(0)=1,D(q)(0)=0; # Assigning initial conditions;
:= yx0 ,( )q 0 1 ( )( )D q 0 0
> dsolve({ode,yx0},q(t)); # Solution of differential equation ( exact);
( )q t3144190951
7116606439312399 e
t10
sin
2249999 t10 2249999
94888128539488812803 e
t10
cos
2249999 t10
509488812803 ( )cos 2 t
28120009488812803 ( )sin 2 t
> q(t):=rhs(%);
( )q t3144190951
7116606439312399 e
t10
sin
2249999 t10 2249999 :=
94888128539488812803 e
t10
cos
2249999 t10
509488812803 ( )cos 2 t
28120009488812803 ( )sin 2 t
> plot(q(t),t=0..15); # Drawing graph of the solution;
81
Solving Rikkati equation> restart:> eq:=diff(y(x),x)=piecewise(x>0,x)*y(x)^2;
:= eq ddx ( )y x
{
x 0 x0 otherwise
( )y x 2
> dsolve({y(0)=1,eq},y(x));
( )y x
1 x 0
2x2 2
0 x
> # Checking of the solution;> simplify(eval(subs(%,eq)));
0 x 04 x
( )x2 22 0 x
0 x 04 x
( )x2 22 0 x
Solving differential equations in quotient derivatives:
> restart:> Diff(u(x,t),t,t)=a^2*Diff(u(x,t),x,x);
2
t2 ( )u ,x t a2
2
x2 ( )u ,x t
> # initial conditions u(x,0)=f(x),Diff(u(x,t),t)=0 with t=0, - infinity < x < infinity,t>=0;
82
> eqn:=diff(u(x,t),t$2)-a^2*diff(u(x,t),x$2)=0;
:= eqn
2
t2 ( )u ,x t a2
2
x2 ( )u ,x t 0
> pdsolve(eqn);( )u ,x t ( )_F1 a t x ( )_F2 a t x
> # _F1(at+x) и _F2(at-x) – arbitrary functions, twice differentiated;
> u:=unapply(rhs(%),x,t); # assign u as a function of 2 parameters x & t;
:= u ( ),x t ( )_F1 a t x ( )_F2 a t x
> # avail that derivative of time from u(x,t) with t=0 равна нулю;
> D[2](u)(x,0)=0;( )( )D _F1 x a ( )( )D _F2 x a 0
> dsolve(%,_F1(x));( )_F1 x ( )_F2 x _C1
> _F1:=F; := _F1 F
> _F2:=x->F(-x); := _F2 x ( )F x
> u(x,t);( )F a t x ( )F a t x
> u(x,0);2 ( )F x
> f:=x->1/5*(1-abs(x))*Heaviside(1-abs(x));
:= f x15 ( )1 x ( )Heaviside 1 x
> F:=(1/2)*f; := F
f2
> a:=1; := a 1
> evalf(u(x,t));
83
0.1000000000 ( )1. 1. t x ( )Heaviside 1. 1. t x0.1000000000 ( )1. 1. 1. t x ( )Heaviside 1. 1. 1. t x
Van der Pole oscillatorClassical model of non – linear system, showing periodical autooscillations.Under different initial conditions phase path is driving to the attractor — the limit cycle.Established movements are periodical oscillations ,which mathematical cycle in the phase space is the limit cycle.
> restart;with(DEtools):with(plots):
> vdp:=diff(x(t),t,t)-2*delta*diff(x(t),t)*(1-alpha*x(t)^2)+omega^2*x(t)=0;
:= vdp
d
d2
t2 ( )x t 2
d
dt ( )x t ( )1 ( )x t 2 2 ( )x t 0
> alpha:=1;omega:=1;d:=0.2; := 1
:= 1
:= d 0.2
> sys:=[diff(x(t),t)=y(t),diff(y(t),t)-2*delta*y(t)*(1-alpha*x(t)^2)+omega^2*x(t)=0];
:= sys
,d
dt ( )x t ( )y t
d
dt ( )y t 2 ( )y t ( )1 ( )x t 2 ( )x t 0
> ff:=dsolve({sys[1],subs(delta=d,sys[2]),x(0)=1,y(0)=1},
{x(t),y(t)}, type=numeric, output=listprocedure);> fp := subs(ff,x(t)): fw := subs(ff,y(t)):
ff t ( )proc( ) ... end proct ( )x t ( )proc( ) ... end proct, ,[ := ( )y t ( )proc( ) ... end proct ]
> steps:=100; init_t:=0; fin_t:=15*Pi; := steps 100
:= init_t 0
84
:= fin_t 15
> g:=seq([fp((fin_t-init_t)/steps*i),fw((fin_t-init_t)/steps*i)],i=0..steps):
> h:=seq([(fin_t-init_t)/steps*i,fp((fin_t-init_t)/steps*i)],i=0..steps):
Phase portrait;
pointplot([g],connect=true,color=red,title="phase portrait",labels=[coordinate,velocity]):
Solution
> pointplot([h],connect=true,color=red,title="oscillations",labels=[t,coordinate]):
> ic:=[[x(0)=3,y(0)=2],[x(0)=2,y(0)=0],[x(0)=0.5,y(0)=0.5],[x(0)=0,y(0)=0]];
> DEplot(subs(delta=d,sys),[x(t),y(t)],t=0..15*Pi,ic,method=rkf45,linecolor=black,color=blue,stepsize=0.1,title="Van-der-Pole Oscillator"):ic [ ],( )x 0 3 ( )y 0 2 [ ],( )x 0 2 ( )y 0 0 [ ],( )x 0 0.5 ( )y 0 0.5, , ,[ :=
[ ],( )x 0 0 ( )y 0 0 ]
> # On changing the parameter <delta> there is a change of the form of attractor, while the topology doesn’t change;
> for i from 1 by 1 to 15 do> #delta:=i/20;> fp[i]:=DEplot(subs(delta=i/20,sys),
[x(t),y(t)],t=0..15*Pi,ic,method=rkf45,linecolor=black,color=blue,stepsize=0.1,title="Van-der-Pole Oscillator"):
> end do:> display(seq(fp[i],i=1..15),insequence=true);
85
>
> restart;with(DEtools):>
mu:=0.01:alpha:=0.1:beta:=0.1:sys:=diff(x(t),t)=y(t),diff(y(t),t)=-x(t)+mu*(-1+alpha*(1+beta*x(t)-x(t)^2))*y(t);
:= sys ,ddt ( )x t ( )y t d
dt ( )y t ( )x t 0.01 ( ) 0.9 0.01 ( )x t 0.1 ( )x t 2 ( )y t
> DEplot3d({sys},[x(t),y(t)],t=0..80, [[x(0)=10,y(0)=10]],stepsize=0.1,orientation=[0,90],method=classical[abmoulton],corrections=3,axes=NORMAL,linecolor=blue);
> > restart;with(DEtools):> mu:=0.01:sys:=diff(x(t),t)=y(t),diff(y(t),t)=-
x(t)+mu*(1-x(t)^2)*y(t);
:= sys ,ddt ( )x t ( )y t d
dt ( )y t ( )x t 0.01 ( )1 ( )x t 2 ( )y t
> f1:= (1-R^2*cos(u)*cos(u))*(-R*sin(u))*sin(u); := f1 ( )1 R2 ( )cos u 2 R ( )sin u 2
86
> FR:=-1./(2.*Pi)*Int(f1,u=0..2*Pi)=-1./(2.*Pi)*int(f1,u=0..2*Pi);
FR
0.5000000000
d
0
2
( )1 R2 ( )cos u 2 R ( )sin u 2 u :=
0.5000000000
R
14 R3
> f2:= (1-R^2*cos(u)*cos(u))*(-R*sin(u))*cos(u); := f2 ( )1 R2 ( )cos u 2 R ( )sin u ( )cos u
> _FR:=1./(2.*Pi)*Int(f2,u=0..2*Pi)=1./(2.*Pi)*int(f2,u=0..2*Pi);
:= _FR 0.5000000000
d
0
2
( )1 R2 ( )cos u 2 R ( )sin u ( )cos u u 0.
> > > > with(DEtools):> > DEplot3d({sys},[x(t),y(t)],t=0..25,
[[x(0)=2,y(0)=2],[x(0)=0.5,y(0)=0.5],[x(0)=5,y(0)=5]],stepsize=0.1,orientation=[0,90],method=classical[abmoulton],corrections=3,axes=NORMAL,linecolor=blue);
> > restart;with(DEtools):>
mu:=0.01:alpha:=0.1:beta:=0.1:sys:=diff(x(t),t)
87
=y(t),diff(y(t),t)=-mu*(alpha*y(t)^4-beta*y(t)^2-1)-x(t);
:= sys ,ddt ( )x t ( )y t d
dt ( )y t 0.001 ( )y t 4 0.001 ( )y t 2 0.01 ( )x t
> DEplot3d({sys},[x(t),y(t)],t=0..10, [[x(0)=1,y(0)=1]],stepsize=0.1,orientation=[0,90],method=classical[abmoulton],corrections=3,axes=NORMAL,linecolor=blue);
> restart;with(DEtools):> fun:=mu*(1+b*y(t)^2-a*y(t)^4);
:= fun ( ) 1 b ( )y t 2 a ( )y t 4
> sys:=diff(x(t),t)=y(t),diff(y(t),t)=-x+fun;
:= sys ,ddt ( )x t ( )y t d
dt ( )y t x ( ) 1 b ( )y t 2 a ( )y t 4
> _y:=-R*sin(u);> Error, attempting to assign to `_y` which is
protected
> f1:=(1+b*_y^2-a*_y^4);
:= f1 1 b _y2 a _y4
> FR:=-1./(2.*Pi)*int(f1*sin(u),u=0..2*Pi); := FR 0.
> _FR:=-1./(2.*Pi)*int(f1*cos(u),u=0..2*Pi); := _FR 0.
88
> > restart;with(DEtools):
The system of Van der Pole equations in approximating lamp characteristic by the third degree polynomial
> sys:={diff(x(t),t)=y(t),diff(y(t),t)=-x(t)+mu*(alpha+2*beta*x(t)-3*delta*x(t)^2)*y(t)};
:= sys { },ddt ( )x t ( )y t d
dt ( )y t ( )x t ( ) 2 ( )x t 3 ( )x t 2 ( )y t
Now we get shortened Van der Pole equations> f1:= (alpha+2*beta*R*cos(u)-
3*gamma*R^2*cos(u)*cos(u))*(-R*sin(u))*sin(u); := f1 ( ) 2 R ( )cos u 3 R2 ( )cos u 2 R ( )sin u 2
> FR:=-1./(2.*Pi)*Int(f1,u=0..2*Pi)=-1./(2.*Pi)*int(f1,u=0..2*Pi);
FR
0.5000000000 d
0
2
( ) 2 R ( )cos u 3 R2 ( )cos u 2 R ( )sin u 2 u :=
0.5000000000
R
3 R3 4
> f2:= (alpha+2*beta*R*cos(u)-3*gamma*R^2*cos(u)*cos(u))*(-R*sin(u))*cos(u);
:= f2 ( ) 2 R ( )cos u 3 R2 ( )cos u 2 R ( )sin u ( )cos u
> PR:=1./(2.*Pi)*Int(f2,u=0..2*Pi)=1./(2.*Pi)*int(f2,u=0..2*Pi);
:= PR 0.5000000000
d
0
2
( ) 2 R ( )cos u 3 R2 ( )cos u 2 R ( )sin u ( )cos u u 0.
Find radii of limited cycles> h:=R*alpha/2-(3*delta*R^3)/8;
:= h 12 R
38 R3
> solve(h,R);89
, ,02 3
3 2 3
3
> mu:=0.01:alpha:=0;beta:=0.5;delta:=0.3;sys;>
:= 0
:= 0.5 := 0.3
{ },ddt ( )y t ( )x t 0.01 ( )1.0 ( )x t 0.9 ( )x t 2 ( )y t d
dt ( )x t ( )y t
> phaseportrait(sys,[x(t),y(t)],t=-6..6, [[x(0)=0.3,y(0)=0.3],[x(0)=1,y(0)=1]],stepsize=0.1,scene=[x(t),y(t)],method=classical[foreuler],linecolor=[black,blue]);
1.10. Оperations with vectors & matricesThe unique opportunity of Maple system is the opportunity of
solving problems of linear algebra in terms of symbols. However, this solution is interesting rather from the point of view of theory ,than practice, because even with a small size of matrices symbol results turn out to be very cumbersome & boundless. They are useful only for solving special analytical problems. That is why, MAPLE elaborators implement numerical methods of solving the problems of linear algebra,
90
besides symbolic ones, which are widely used in modelling various technical systems. One of the main packages of solving the problems of linear algebra is the package linalg. It is based on functions, implementing operations with vectors & matrices. Methods of setting tasks to vectors:
> restart;with(linalg):with(LinearAlgebra):> v[1]:=array(1..3,[-3,0,4]);
:= v1 [ ], ,-3 0 4
> v[2]:=array(1..3,[1,2,7]); := v2 [ ], ,1 2 7
> v[3]:=array(1..3,[3,4,-8]); := v3 [ ], ,3 4 -8
> u[1]:=<3|-2|0>; := u1 [ ], ,3 -2 0
> u[2]:=<13|-22|0.1>; := u2 [ ], ,13 -22 0.1
> u[3]:=<23|-29|54>; := u3 [ ], ,23 -29 54
> s[1]:=vector[row]([-3,0,4]); := s1 [ ], ,-3 0 4
> s[2]:=vector[row]([1,2,7]); := s2 [ ], ,1 2 7
> s[3]:=vector[row]([3,4,-8]); := s3 [ ], ,3 4 -8
> alpha[1]:=vector(3,[-3,0,4]); := 1 [ ], ,-3 0 4
> alpha[2]:=vector(3,[1,2,7]); := 2 [ ], ,1 2 7
91
> alpha[3]:=vector(3,[3,4,-8]); := 3 [ ], ,3 4 -8
Operations with vectors:
> # Scale product of vectors;> dotprod(v[1],v[2]);
25
> dotprod(s[1],s[2]);25
> dotprod(alpha[1],alpha[2]);25
> # Vector product of vectors;> crossprod(v[1],v[2]);
[ ], ,-8 25 -6
> crossprod(s[1],s[2]);[ ], ,-8 25 -6
> crossprod(alpha[1],alpha[2]);[ ], ,-8 25 -6
> # Mixed product of vectors;> dotprod(crossprod(alpha[1],alpha[2]),alpha[3]);
124
> # angle between vectors;
> angle(alpha[1],alpha[2]);
arccos
25 5454
> evalf(%);0.8224691544
> norm(alpha[1],3); evalf(%);# Norm of three- dimensional vector;
91( )/1 3
4.497941445
> normalize(alpha[1]);#
92
, ,
-35 0
45
> Basis([u[1],u[2],u[3]]);# Defining the basis of vectors, only as u[i] (package Linear Algebra);
[ ], ,[ ], ,3 -2 0 [ ], ,13 -22 0.1 [ ], ,23 -29 54
> GramSchmidt([u[1],u[2],u[3]]); # Orthogonalization of vector system only as u[i] (package Linear Algebra);
[ ], ,3 -2 0 [ ], ,-6.15384616000000052 -9.23076922999999994 0.100000000000000004, ,[[ ], ,0.269465600000000192 0.404198399999998515 53.8931211840000018 ]
> convert(alpha[1],list[1]);# Преобразование вектора в список;
[ ], ,-3 0 4
Methods of setting tasks to matrices:> restart: with(linalg):Warning, the protected names norm and trace have
been redefined and unprotected
> C:=matrix(3,3); := C ( )array , , .. 1 3 .. 1 3 [ ]
> C1:=array(1..3,1..3); := C1 ( )array , , .. 1 3 .. 1 3 [ ]
> A:=matrix(3,3,[1,2,-5,2,8,0,-4,-3,-7]);
:= A
1 2 -52 8 0
-4 -3 -7
> B:=matrix(3,3,[1,2,-5,7,6,-8,3,4,-9]);
:= B
1 2 -57 6 -83 4 -9
> C2:=matrix(2,3,[1,2,3,4]);
:= C2
1 2 34 C2 ,2 2 C2 ,2 3
93
> C3:=array(1..3,1..3,[[1,2,-5],[2,8,0],[-4,-3,-7]]);
:= C3
1 2 -52 8 0
-4 -3 -7
> C4:=array(1..3,1..3,[[1,2,-5],[7,6,-8],[3,4,-9]]);
:= C4
1 2 -57 6 -83 4 -9
Operations with matrices:> rowdim(A); # The number of lines of matrix;
3
> coldim(A); # The number of columns of matrix;3
> evalm(C3+C4);# Addition <subtraction >;
2 4 -109 14 -8
-1 1 -16
> matadd(C3,C4);# Addition of matrices;
2 4 -109 14 -8
-1 1 -16
> multiply(C3,C4);#Multiplication of matrices;
0 -6 2458 52 -74
-46 -54 107
> evalm(C3&*C4);#Multiplication of matrices;
0 -6 2458 52 -74
-46 -54 107
> evalm(2*C3); # Multiplication of matrix by number;
2 4 -104 16 0
-8 -6 -14
94
> evalm(2+C4);# Addition of matrix with a number , multiplied by a single matrix;
3 2 -57 8 -83 4 -7
> evalm(C3^3);# Raising matrix to power;
-29 224 -335194 610 -20
-280 -259 -573
> evalm(A^(-1));# Finding inverse matrix;
2879
-29158
-2079
-779
27158
579
-1379
5158
-279
> inverse(A); # Finding inverse matrix;
2879
-29158
-2079
-779
27158
579
-1379
5158
-279
> C:=A^3+4*A+5;# Matrix – the function from matrix; := C A3 4 A 5
> evalm(C);
-20 232 -355202 647 -20
-296 -271 -596
> evalm(A^0);1
> transpose(A);# Finding transparent matrix;
1 2 -42 8 -3
-5 0 -7
> det(A);#Finding the determinant of matrix;-158
95
> rank(A);# Finding the rank of matrix;3
> trace(A);# Finding the trace of matrix;2
> norm(B);# Norm of matrix;21
> kernel(B); # Kernel of matrix;{ }
Spectral analysis of matrix:
> evalf(eigenvalues(B,C)); # Proper numbers of matrix;
0.00885552382 0.36 10-9 I -0.1647751158 0.91858429 10-11 I, ,0.00035980130 0.3891858429 10-9 I
> evalm(C);
-20 232 -355202 647 -20
-296 -271 -596
> evalf(eigenvectors(B)); # Proper numbers +their multiples + proper vectors;
4.142790972 0.1 10-8 I 1., ,[{ }[ ], ,0.338459235 0.1074774346 10-8 I 3.031853317 0.6310807598 10-9 I 1. ] [,
-5.897200018 0.2660254040 10-9 I 1., ,{ }[ ], ,0.638960942 0.3163025798 10-9 I 0.296479288 0.3687332859 10-9 I 1. ] [,
-0.245590958 0.1466025404 10-8 I 1., ,{ }[ ], ,-2.448008414 0.1681121105 10-9 I 4.024608571 0.1754222681 10-9 I 1. ]
> evalf(eigenvals(B,C));0.00885552382 0.36 10-9 I -0.1647751158 0.91858429 10-11 I, ,
0.00035980130 0.3891858429 10-9 I
> evalm(C);
-20 232 -355202 647 -20
-296 -271 -596
96
> charpoly(A,lambda); # Characteristic polynomial of matrix ;
3 2 2 79 158
> charmat(A,lambda); # Characteristic matrix ;
1 -2 5-2 8 04 3 7
> minpoly(A,lambda); # Minimum polynomial (divisor);
3 2 2 79 158
> jordan(A);# Jordan form of matrix;
2 0 00 79 00 0 79
> gausselim(A); # Giving matrix a triangle type by Gauss method-;
1 2 -50 4 10
0 0-792
> gaussjord(A); # -by Gauss-Jordan method ;
1 0 00 1 00 0 1
> definite(B,'positive_def'); # Defining positive determination of matrix (yes - true,no - false);
false
Symbol operations with matrices:> restart: with(linalg):> M1:=array(1..2,1..2,[[a1,b1],[c1,d1]]);
:= M1
a1 b1c1 d1
> M2:=array(1..2,1..2,[[a2,b2],[c2,d2]]);
:= M2
a2 b2c2 d2
97
> evalm(M1+M2);
a1 a2 b1 b2c1 c2 d1 d2
> evalm(M1/M2);
a1 d2a2 d2 b2 c2
b1 c2a2 d2 b2 c2
a1 b2a2 d2 b2 c2
b1 a2a2 d2 b2 c2
c1 d2a2 d2 b2 c2
d1 c2a2 d2 b2 c2
c1 b2a2 d2 b2 c2
d1 a2a2 d2 b2 c2
> evalm(M1^2);
a12 b1 c1 a1 b1 b1 d1c1 a1 d1 c1 b1 c1 d12
> evalm(sin(M1));
( )sin a1 ( )sin b1( )sin c1 ( )sin d1
> evalm(M1+z);
a1 z b1c1 d1 z
> M3:=array(1..2,1..2,[[x,x^2],[x^3,x^4]]);
:= M3
x x2
x3 x4
> map(diff,M3,x);# Function map – uses the given operation to every element of matrix;
1 2 x3 x2 4 x3
> map(int,%,x);
> map(sin,M3);
( )sin x ( )sin x2
( )sin x3 ( )sin x4
> # Generation of functional matrix;> f[1]:=(i,j)->x^i+y^j;
:= f1 ( ),i j xi yj
> AA:=matrix(2,3,f[1]);98
:= AA
x y x y2 x y3
x2 y x2 y2 x2 y3
> restart:
> A:=Matrix(3,3,[[omega,2,3],[4,5,6],[7,8,9]],readonly=true);
:= A
2 34 5 67 8 9
> omega:=1:> as:=Matrix(3,3,readonly=false);
:= as
0 0 00 0 00 0 0
> as:=A;
:= as
1 2 34 5 67 8 9
> omega:=2:
> print(as);
2 2 34 5 67 8 9
> restart:
> a:=(omega)->matrix(2,2,[[12,omega],[43,566]]);
:= a ( )matrix , ,2 2 [ ],[ ],12 [ ],43 566
> a(23);
12 2343 566
Solving the system of linear equations С*X=B:> restart:with(linalg):
99
Warning, the protected names norm and trace have been redefined and unprotected
> C:=matrix(3,3,[[4,8,2],[6,2,3],[3,7,11]]);
:= C
4 8 26 2 33 7 11
> B:=matrix(3,1,[5,6,1]);
:= B
561
> X:=matrix(3,1); := X ( )array , , .. 1 3 .. 1 1 [ ]
> X:=evalm((C^(-1))*B);# the first method;
:= X
419380320-2995
> X:=multiply(inverse(C),B); # the second method
:= X
419380320-2995
> X:=linsolve(C,B); # the third method;
:= X
419380
320-2995
> # Interactive input of matrix;> restart;> with(linalg):
100
Warning, the protected names norm and trace have been redefined and unprotected
> #A:=array(1..3,1..3);> #entermatrix(A);> 1;
1
> 3;3
> 2;2
> 5;5
> 7;7
> 5;5
> 2;2
> 5;5
> 9;1.11. Transformation of complex numbers, analytical
expressions & functions of a complex variable
Operations with complex numbers:> restart: with(linalg): with(plots):> z::complex:# Announcing z – as a complex number;> z:=3+4*I;
:= z 3 4 I
> Im(z);# False part of complex number;4
> Re(z);# Material part of complex number;3
> abs(z);#Module of complex number;5
101
> argument(z); # Argument of complex number;arctan
43
> evalf(%);0.9272952179
> conjugate(z);# Conjugate to complex number;3 4 I
> AA:=polar(z);# Trigonometric form of complex number ;
:= AA
polar ,5
arctan
43
> exp(z);# Exponent of complex number;
e( )3 4 I
> A:=evalf(evalc(exp(z))); := A -13.12878308 15.20078446 I
> Re(A);-13.12878308
> Im(A);-15.20078446
Functions of complex variable:> restart:with(plots):> w,p::complex:
> w:=(p)->(1+p^4)/(1+2*p+p^3);
:= w p1 p4
1 2 p p3
> p:=I*omega; := p I
> complexplot(w(p),omega=0..10,thickness=2);
102
> # Drawing in (Re w, Im w)of hodograrh:> restart: with(plots):> w:=(1+0.1*p)/(1+0.01*p^2+p^3);p:=I*omega:
:= w1 0.1 p
1 0.01 p2 p3
> complexplot(w,omega=0..100,color=black,thickness=2);
> restart:> p:=I*omega;
:= p I
> w:=(1+0.1*p+p^2)/(1+0.01*p^2+p^3);
103
:= w 1 0.1 I 2
1 0.01 2 3 I
plot([Re(w),Im(w),omega=0..100],thickness=2);
> restart: with(plots):> u,v,w,p::complex:> p:=I*omega;
:= p I
> u:=(4+0.1*p)/(1+0.01*p^2);
:= u4 0.1 I 1 0.01 2
> v:=(3+p)/(1+0.01*p^5); := v
3 I1 0.01 I 5
> w:=(1+0.1*p)/(1+0.01*p^4);
:= w1 0.1 I 1 0.01 4
> complexplot([u,v,w],omega=0..5,color=[RED,GREEN,GOLD],style=[line,point,line], thickness=3);
104
Transformation of complex expressions:> restart:> p:=I*omega;
:= p I
> w:=(a[1]+a[2]*p+a[3]*exp(p*tau)*p^2+a[4]*p^5)/(b[1]+b[2]*p^2+b[3]*p^3);
:= w a1 a2 I a3 e
( ) I2 a4
5 I
b1 b2 2 b3
3 I
> simplify(evalf(evalc(w))); 1. 1. a1 b1 a1 b2
2 a3 ( )cos 2 b1 1. a3 ( )cos 4 b2 4 b3 a2 (
1. 5 b3 a3 ( )sin 8 b3 a4 1. I a2 b1 1. I 3 a2 b2 1. I 2 a3 ( )sin b1
1. I 4 a3 ( )sin b2 1. I 5 a4 b1 1. I 7 a4 b2 1. I 3 b3 a1
1. I 5 b3 a3 ( )cos ) b1
22. b1 b2
2 b2
24 b3
26( )
> simplify(evalf(evalc(conjugate(w))));# Сопряженное от w;
a1 b1 1. a1 b2 2 1. a3 ( )cos 2 b1 a3 ( )cos 4 b2 1. 4 b3 a2 (
5 b3 a3 ( )sin 1. 8 b3 a4 1. I a2 b1 1. I 3 a2 b2 1. I 2 a3 ( )sin b1
1. I 4 a3 ( )sin b2 1. I 5 a4 b1 1. I 7 a4 b2 1. I 3 b3 a1
1. I 5 b3 a3 ( )cos b1
22. b1 b2
2 b2
24 b3
26) ( )
>
> evalf(evalc(Re(w)));
105
( )a1 1. a3 ( )cos 2 ( )b1 1. b2
2
( )b1 1. b2 2
2b3
26
1. ( ) a2 1. a3 ( )sin 2 a4 5 b3
3
( )b1 1. b2 2
2b3
26
> evalf(evalc(Im(w)));
( ) a2 1. a3 ( )sin 2 a4
5 ( )b1 1. b2 2
( )b1 1. b2 2
2b3
26
( )a1 1. a3 ( )cos 2 b3 3
( )b1 1. b2 2
2b3
26
>
Work with complex functions> > # Find the image of single circle of complex
plane z(t)=exp(I*t) by transformation w(t)=(z(t)-0.5*z(Pi/4))/(1-0.5*z(-Pi/4)*z(t));
> restart;> z(t),w(t)::complex;
,( )z t ::( )w t complex
> z:=(t)->exp(I*t);
:= z t e( )t I
plot([
>evalc(Re(z(t))),evalc(Im(z(t))),t=0..2*Pi],thickness=2);
> w:=(t)->(z(t)-0.5*z(Pi/4))/(1-0.5*z(-Pi/4)*z(t));
106
:= w t( )z t 0.5
z
4
1 0.5
z
4 ( )z t
> w(t):=simplify(evalc(w(t)));( )w t 0.250000000 109 ( )sin t 0.1000000000 1010 I ( )sin t( :=
0.1000000000 1010 ( )cos t 0.250000000 109 I ( )cos t
0.707106781 109 0.707106781 109 I ) (
0.707106781 109 ( )sin t 0.1250000000 1010 0.707106781 109 ( )cos t )
> wRe(t):=simplify(evalc(Re(w(t))));
:= ( )wRe t 1. ( ) 0.250000000 109 ( )sin t 0.1000000000 1010 ( )cos t 0.707106781 109
0.707106781 109 ( )sin t 0.1250000000 1010 0.707106781 109 ( )cos t
> wIm(t):=simplify(evalc(Im(w(t))));
:= ( )wIm t 1. ( ) 0.1000000000 1010 ( )sin t 0.250000000 109 ( )cos t 0.707106781 109
0.707106781 109 ( )sin t 0.1250000000 1010 0.707106781 109 ( )cos t
plot([wRe(t),wIm(t),t=0..2*Pi],thickness=2);
So , the manual is concerned with the packages of functions of the system of analytical calculations Maple, methods of setting tasks to functional dependencies & of drawing their graphs, examples of calculating limits, derivatives & integrals, operations with rows, solving equations, inequalities & their systems, analysis of functions, solving differential equations & their systems, operations with matrices & vectors, transforming complex numbers, expressions & functions of complex variable. For each case there are examples ,illustrating the
107
implementation of function of Maple system. This set of function is sufficient for computer modelling of particular dynamic systems, analyzed by the authors of this manual at different times.
The above mentioned approaches to using the potentialities of the system of analytical calculations Maple for carrying out numerical procedures can be used in working out software in terms of writing term-papers ,Bachelors ‘- & Masters’ papers. Judging by the authors’ experience in this field , the main task for students consists ,as a rule , of elaborating the program , implementing an algorithm on the basis of the received mathematical model. Hence ,it is desirable that identificators in the program should be similar to the ones , given in the program of your scientific adviser. For this reason, the Appendix presents the Greek alphabet & identificators of its letters < small & capital >, used in the system of analytical calculations Maple.
108
3. Test assignments for doing laboratory tests on computers
Assignment N 1.
1. Drawing graphs of functions:
а)y = x2
x+1 b) y=e1
2−x c) z =x+√ y
d) {x=3 cos ( t )¿ ¿¿¿
e) ρ=2sin3(ϕ )
2. Solving equations & systems of equations:
а) x3−2 x2−19 x−30=0 b)
{7 x+ y+3 z=23 ¿ {5 x+3 y+3 z=13 ¿ ¿ ¿¿3. Vectors:
а) α 1(3 ,−5,2) , α2(2,−3,4 ) , Define ϕ = corner α 1^α 2
b) α 1(3,0,2) , α 2(−5,4,3) , Define α 1× α2 – vectorialc) α 1(1,2,3 ), α 2(3,4,5 ) ,α 3(−2,3,5 ) , Find α 1⋅α2⋅¿ ¿α 3– mixed
4. Find f(X) & eigen numbers of matrix f(X)
f(X)=X2+3 X+4 X = (1 3 34 5 67 8 9 )
5. Limits а) lim
x →0
e3 x−e5 x
x b) limx →0
(xln ( x+1 )−ln (x ))
6. Find the derivative:
а) y =2 x
1−x2 y '=? b) {y=t
1+t ¿¿¿¿
y x'=?
109
c) {x=3√1−√t ¿¿¿¿ y x
' =? d) x2+2 xy− y2=2 x y x' ( x )=?
e) z=√ 1+x1+ y+x
, ∂ z∂ x
=? ∂ z∂ y
=?
7. Integral:
а) ∫ xdx√1−x2 b)
∫− π
6
π6
еsin( x )sin(2 x )dx
c) ∫−∞
∞ dx(x2+1 )2
d) ∬
D
x3
( x+ y )3dxdy ,
D: 0≤x≤21≤ y≤4 e)
∫−∞
∞
∫−∞
∞ dxdy1+x2+ y2
8. Complex numbers, polynomials: а) Draw in (Re(W), Im(W) ) hodograph:
W=0,1 р
1+0,2 р2 р=iω , ω∈ (0 ,200 ); б) Calculate the roots & draw them in (Re,Im):
x4+4 x3−4 x2−16 x−8=09. Analyze coincidence of rows:
а) ∑n=2
∞ √n+2−√n−2n3 b)
∑n=1
∞ ln100(n)n
sin( πn4)
c) Expand into Tailor row in the field x0: y=1x , x0=1
d) Expand into Fourier row in the given interval:y=sh(5 x ) , x∈ (−π ,π )
10. Solve differential equations & systems of equations:
а) y ' '−5 y '+6 y=(12 x−7 )е− x , y (0 )= y ' (0 )=0
b) (2 x3−xy 2 )dx+(2 y3−x2 y )dy=0
110
c){dxdt= y−7 x ¿ ¿¿¿
111
Assignment N2.
1. Drawing graphs of functions:
а) y=
3∗( x− 12x2
)b) y=x− ln ( x+1 ) c) z=
√1−x2+√ y2−1
d) {x=t+ch ( t )¿ ¿¿¿ e)
ρ=4 (1−cos (ϕ ))
2. Solving equations & systems of equations:
а) 2 x+( x+2)2+( x3−2 x )=0 b){2 x− y+z=−3 ¿ {3x+2 y−5 z=−30 ¿ ¿¿¿
3. Vectors:
а) α 1(3 ,−2,0) , α 2(0,1,5 ), Find corner ϕ =corner α 1^α 2
b) α 1(2,5,4 ) , α2 (−1 ,−3,5) , Find α 1× α2 – vectorialc) α 1(1,2,3 ), α 2(3,4,5 ) ,α 3(0 ,−1,2) , Find α 1⋅α2⋅¿ ¿α 3– mixed product4.
Find f(X) & eigen numbers of matrix f(X)
f(X)=X3+2 X+3 X=(1 5 43 2 11 2 2 )
5. Limits
а) limx →0
x3x−5 x+6x2−3 x+2
b) limx→ 0¿¿¿
6. Find the derivative:
а) y=(1−x )3
(1+x )4 y '=? b) {y=1
2t2 ¿¿¿¿
y x'=?
112
c) {x=sin2( t ) ¿¿¿¿ y x' =? d) y2=4 x y x
' ( x )=?
e) z =2 x
y√ x+ y∂ z∂ x
=? ∂ z∂ y
=?
113
7. Integrals:
а) ∫ x2 (3√1+x2) b)
∫0
1
arctg(√ x )dxc) ∫√2
∞ dx( x√ x2−1 )
d) ∬
D( x+2 y+5 )3 dxdy ,
D: 0≤x≤20≤ y≤√ x
e) ∫−∞
∞
∫−∞
∞ dxdy
(1+x2+ y2)3
2
8. Complex numbers, polynomials:а) Draw in (Re(W), Im(W)) hodograph:
W=1+0 . 1 р
1+0,5 p+0,1 р2 p=iω , ω∈ (0 ,100 )
б) Calculate the roots & draw them in (Re, Im): x4+3 x3−4 x−1=0 .
9. Analyze coincidence of rows:
а) ∑n=1
∞
(√n+2−4√n2+n+3)б) ∑n=1
∞
sin( π √n2+4 )
в) Expand into Taylor row in the field x0: y=3√ex+7 ,
x0=−5
г) Expand into Fourier row in the given interval:y=sin( 7 x
2) ,
(−π ,π )
10. Solve differential equations & systems of equations:а)y ' '+9 y=6 е3 x , y (0 )= y ' (0 )=0
б) xdx
x2+ y2=( y
x2+ y2−1)dy
в) {dxdt=x−3 y ¿ ¿¿¿
114
Assignment № 3.
1. Drawing graphs of functions:
а) y=4−x2
2x−1 б) y=ln ( 1
x2−1 ) в) z=√4−x2− y2
г) {x=t+cos ( t )¿ ¿¿¿
t∈ [0,4 π ]
д) ρ=1+cos2 ϕ ϕ∈ [0 , π ]
2. Solving equations & systems of equations:
а)x4+6 x3+2 x2+5 x+1=0 б){2 x+3 y+z=15 ¿ {−x+2 y+3 z=17 ¿ ¿¿¿
3. Vectors:
а) α 1(−3,2,5) , α 2(−1,0,4 ) , Find ϕ = corner α 1^α2
b) α 1(0,3,8 ) , α2(−1 ,−2,5 ) , Find α 1× α2 – vectorial product c) α 1(−2,3,5 ), α 2(−4,1,0 ) , α3 (1,5,0) , Find α 1⋅α2⋅¿ ¿α 3– mixed product
4. Find f(x) & eigen numbers of matrix f(X)
f(X)=2 X5+X+1 X=( 1 3 5−2 1 04 3 2 )
5. Limits а) lim
x →0
3√ x−1√ x−1
б) limx →0
ln (1+2 x )x
6. Find the derivative:
а) y=x+√ x+ 3√x y x' =? б) { y=t2−t ¿ ¿¿¿ y x
'=?
c) {x=ach( t )¿ ¿¿¿ y x' =? d) √ x+√ y=1 y x
'=?
115
e) z=arcsin(4+x3
3− y2 )∂ z∂ x
=? ∂ z∂ y
=?
7. Integrals
а) ∫ xdx
3−2 x2 b) ∫ln
ln 3
еx ln (1+2е2 x )dxc) ∫1
∞ arctg ( x )x2 dx
d) ∬
D
xy ( x+1 )dxdy ,D:
0≤x≤20≤ y≤x2 e)
∫0
∞
∫0
∞ dxdy( x2+ y2+5)2
8. Complex numbers, polynomials:
а) Draw in (Re(W), Im(W)) hodograph: W=1+0 .2 р2
1+0,1 р , р=iω ,ω∈ (0 ,100 )
б) Define L.C.D. of polynomials:Р5 (x )= x5+x4−x3−3 x2−3 x−1 Р4 ( x )= x4−2 x3−x2−2 x+1
9. Analyze coincidence of rows:
а)
∑n=3
∞
ln( ch( π4 )
cos( π4 ) ) б)
∑n=1
∞(−1 )n sin2( n)
n
c) Expand into Taylor row in the field x0: y=x
4 x−1 , x0=2
d) Expand into Fourier row in the given interval:y=cos(5 x ) ,x∈ (−π ,π )
10. Solve differential equations & systems of equations:
а) y ' '−4 y'+5 y=2 x2 еx , y (0 )=2 , y '(0 )=3 б) е y dx+( xе y−2 y )dy=0
в){dxdt=x−2 y−z ¿ {dy
dt=−x+ y+z ¿ ¿¿¿
116
Assignment № 4.
1. Drawing graphs of functions:
а) y=x2
x+1 б) y=
ln x√ x
в) z= ln (-x -у )
c) {x=tet ¿ ¿¿¿
t∈ [-2,2]
d) ρ=5(1+cosφ), φ∈ [0,2π]
2. Solving equations & systems of equations:
а) (x2+x +1)(2x2+2x -3)=-3(1-x -x2) б) {3 x+ y+ z=15 ¿ {2 x+4 y−z=10 ¿¿¿¿
3. Vectors:
а)α 1(0,3,9 ) , α2(−4,3,5) , ϕ=corner betweenα 1^α 2
б)α1(0,3,8 ) , α2( 4,5,1) , Find α 1× α2 – vectorial productc)α 1(−2,7 ,11), α 2(1,3,8 ), α3(1 ,−2,4) , Find mixed product α 1 α 2 α3 –
4. Find f(X) & eigen numbers of matrix f(X)
f (X )=X3+4 X2 ,X=(1 2 5
4 3 31 2 1 )5. Limits
а) limx→1( 3
1−x3−2
1−x2 ) б) limx→∞ (x+2x )1x
6. Find the derivative:
а) y=3√1+ 3√1+ 3√ x y '=? б) { y=sin2 ( t )¿ ¿¿¿, y '=?
117
c) {x=2( t−sin ( t ))¿ ¿¿¿, y x' =? e)
arctg ( yx)=ln (√ x2+ y2 ) y x
' =?
d)z=√ 1+x
1+ y , dzdx=?
, dzdy=?
7. Integrals
а)∫ xdx
4+x4 б)∫1
2
1arcsin2( x )dx
c)∫−∞
0dx
4+ x2
d)∬
D( x+xy−x2− y2 )dxdy
D: 0≤x≤1 , 0≤ y≤2 e) ∫−∞
∞
∫−∞
∞
e−|x|−|y|dxdy
8. Complex numbers , polynomials: а) Draw in (Re(W), Im(W)) hodograph:w= 1+0,1 p
1+0 ,01 p2 , p=iω ,ω∈(0 ,100)
9. Analyze the coincidence of rows:
а)∑n=1
∞( ctg( πn
4 n+2)−sin( πn
2n+1))
б)∑n=1
∞
(−1 )n √nn+100
в) Expand into Taylor row in the field x0: y=3√e−2 x , x0=−2
10. Solve differential equations & systems of equations:
а) y ' '−6 y '+9 y=x2−x+3 ,y (0 )=4
3 , y ' (0 )= 1
27
б) y '=2 x+3 y+5
c){dxdt=2 x+ y ¿ ¿¿¿
118
Assignment № 5.
1. Drawing graphs of functions:
а) y=( x+1 ) ( x−2 )2 б) y=(2+x2)e− x2
c) z=x sin√ y
d) {x=t cos t ¿ ¿¿¿
t∈ [0,2 π ]
e) ρ=3sin22ϕ , ϕ∈ [0 , π ]
2. Solving equations & systems of equations.
а) (1+x2)2=2 x (1−x2) б){2 x+ y+2 z=5 ¿ {−4 x+3 y+z=30 ¿ ¿¿¿
3. Vectors.
а) α 1 (−5,4,3 ); α 2 (0,1,7 ) ; Find corner between vectors ϕ=α1 α2 б) α 1 (0,8,7 ) ; α 2 (−1,4 ,−3 ); Find vectorial product α 1×α2
c) α 1 (1,4,5 ); α 2 (0 ,−3,4 ); α 3 (1 ,−2,2 ); Find mixed product α 1 α2 α3
4. Find F(x) & eigen numbers of matrix F(X).
f (X )=X2+3 X+ 4X
X=(1 2 13 3 44 2 7 )5. Limits.
а)limx→0
e x−1sin( x ) б)
limx→∞(1+ 1
x )x
6. Derivatives.
а) y=sin (sin (sin ( x )) ) , y x' =? б)
{ y=sin3 ( t )¿ ¿¿¿, y x
' =?
119
c) {x=e2 t cos2( t ) ¿ ¿¿¿, y x' =? d) x3+ yx− y2+2 x=5, y x
' =?
e) Z= tg (3 x− y )+6y+ x,
∂ z∂ x
=?,∂ z∂ y
=?
7. Integrals∫ dx
(1+x )√ x б) ∫0
1dx
(x3+x2+2 x+2 )2 c)
∫0
∞
xe− x2dx
d) ∬
D
( x+ y+1 )dxdyD:
0≤x≤10≤ y≤2 e)
∫0
∞
∫0
∞
( x+ y ) e− (x+ y ) dxdy
8. Complex numbers, polynomials.
а) Draw in (Re(W), Im(W)) hodograph:
W= 1+0 .1 p
1+0 .1 p+0. 2 p2 , p=iω , ω∈(0 , 100)
б) Define LCD of polynomials.p5 (x )=x5−2 x4+x3+7 x2−12 x+10 p4 ( x )=3x4−6 x3+5 x2+2x−2
9. Analyze coincidence of rows:
а) ∑n=1
∞ n !n√n б)
∑n=1
∞ (−1)nn√n
в) Expand into Taylor row of function in the field x0: y=√x3 , x0=1
г) Expand into Fourier row in the given interval: y=x2+1, (−2,2)
10. Solve differential equations & systems of equations.
а) y ' '−4 y'+4 y=e2 x , y (0 )=2 , y ' (0 )=8
б) 2 y '+3 y+4 y5=0
120
c){dxdt=x− y+z ¿ {dy
dt=x+ y−z ¿ ¿¿¿
121
Assignment № 6.
1. Draw graphs of functions:
а) y=4 x2−x4−3 б) y=xe2 x−1 c) z =x2+y2
d) {x=sin t ¿ ¿¿¿
t∈ [0,2 π ]
e) ρ=2(1+sin(ϕ )),ϕ∈ [0 ;2 π ]
2. Solving equations & systems of equations:а) (x+1)(x+2)(x+3)(x+4)=120; б)
{x+3 y+4 z=29 ¿ {4 x− y−2 z=−26 ¿ ¿¿¿3. Vectors:
а) α 1(0,2,4 ) , α2 (−3 ,−7,2) , Find ϕ = corner α 1^α 2
б) α 1(0,5,7 ) , α2 (4 ,−3,7 ), Find α 1× α2 – vectorial product
c) α 1(−2,3,7 ), α 2(0,1,4 ) , α 3(1 ,−1,7 ) , Find α 1⋅α2⋅¿ ¿α 3– mixed product
4. Find f(X) =X3+X+4 /X , if X = (1 2 54 3 01 1 2 ).
Find eigen numbers of matrix f(x).
5. Limits а) lim
x →0ctg(x)
1ctg (x) б) lim
x →0
2 xsin (x )1−cos ( x )
6. Find the derivative:
а) y=sin(cos2(x))cos(sin2(x))) y x' =? б) { y=arcsin ( t2 ) ¿ ¿¿¿
y x'=?
122
c){x=arcsin ( t
√1+t2)¿ ¿¿¿
y x' =? d) x3+3 xy+ y3−2=0 y x
'=?
e) z=ln (x3 y2 )∂ z∂ x
=? ∂ z∂ y
=?
7. Integrals:
а)∫sin 1
xdxx2 б)
∫0
1/√3dx
(2 x2+1)√x2+1 c)∫−∞
+∞ dx( x2+4 )(1+x2 )
d)∬
D( x2+4 y2+9)dxdy ,
D: 0≤x≤20≤ y≤√4−x2 e)
∫0
∞
dx∫0
∞
xy e−x2− y2dxdy
8. Complex numbers, polynomials:
а) Draw in (Re(W), Im(W)) hodograph:
W=
51+0 .1 ρ р=iω ,ω∈[ 0 ,100 ]
б) Define L.C.D. of polynomials:P6(x) = x6−7 x4+8x3−7 x+7; P5(x) = 3x5–7x3+3x2–7;
9. Analyze coincidence of rows:
а)∑n=1
∞
(1√n
−√ ln( n+1n
))б)
∑n=2
∞ (−1 )n
√n+(−1)n
c) Expand into Taylor row in the field x0: y=1
√x+1 , x0=3
d) Expand into Fourier row in the given interval: y=|1−x|,(−2,2 )
10. Solve differentials equations & systems of equations:
а) y ' '+4 y '+3 y=е5 x , y (0 )=3 ; y ' (0)=9
б)y '= x+ y−2
y−x−4
123
c){dxdt=3 x− y+z ¿¿¿¿
124
Assignment № 7.
1. Draw the graphs of functions.
а)
y=
x2
x2−2
б) y=e1/x−x
c) z = cos (x)*cos(y)
d) {x=e5 t ¿ ¿¿¿
t∈ [−10 , 10 ]
e) ρ=4 (sin(ϕ )+cos(ϕ ))ϕ∈ [0 ;2 π ]
2. Solving equations & systems of equations.
а) ( 3–x)4+(2–x)4=(5–2x)4 б) {3 x+ y+2 z=3 ¿ {2x+ y+2 z=2 ¿¿¿¿
3. Vectors.а)α 1( 0,5,7), α 2 (−1,3 ,−7). Find ϕ=α 1 α 2 .
b)α 1(1,7 ,−4 ), α 2 (1,0,5 ). Find α 1×α 2 – vectorial product.c)α 1(1,3,5 ), α 2 (0,1,−5), α 3 (4,5 ,−9). Findα 1 α 2 α 3 – mixed product.
4. Find f(X )= X2+2X+3 , if
X=(1 1 42 3 51 2 1 ) , Find eigen numbers of matrix f(X).
5. Limits.
a)limx→∞
2x
x3 b)limx→π
cos ( x2)
x−π
6. Derivatives.
125
а) y = 1/cos5 (x),∂ y∂ x
=?, b) { y=1 /sin ( t )¿ ¿¿¿,
∂ y∂ x
=?, c){x=sin3( t ) ¿ ¿¿¿
, ∂ y∂ x
=?
d) x2/4+y2/9 =1, ∂ y∂ x
=?e) z =x2+xy 2+sin y ,
∂ z∂ x
=?
∂ z∂ y
=?
7. Integrals.
а)∫ dx
x √x2−1 b)∫0
π2 sin (2 x )dx
2cos2 ( x )+3 sin2( x ) c)∫0
∞
e−7 x cos(3 x )dx
d)∬
Д
( x+ y+10)dxdy D:
0≤x≤20≤ y≤x2 e)
∫0
∞
∫0
∞
e−(x 2+5 xy+ y2 )dxdy
8. Complex numbers, polynomials.
a) Draw in (Re(w),Im(w)) hodograph :
w=5
1+0,1 p+0,2 p2 ,p=iω ,ω∈ [0 ,200 ]
б) Define L.C.D of polynomials: p5(x) = x5–10x4–x1
9. Analyze coincidence of rows.
а) ∑n=2
∞ n lnn
( ln(n) )n b) ∑n=2
∞ 1ln2(n )
cos( πn2
n+1)
c) Expand into Taylor row in the field x0: y=cos ( πx
5) , x0=10
d) Expand into Fourier row in the given interval: y=1−x , (−1,1)
10. Solve differential equations & systems of equations.126
a) y ' '−8 y '+16 y=e4 x y (0 )=0 , y ' (0)=1 b)2 xdx
y3 + y2−3 x2
y4 dy=0
c){dxdt=2 x+ y ¿ {dy
dt=x+3 y−z ¿¿¿ ¿
127
Assignment № 8.1. Draw graphs of functions:
а) y=x+ 4
x2 ; b) y=(e2 x−1 )−1; c) z =x3+
4√ y ;
d) {x=arcsin ( t
√1+t2)¿ ¿¿¿
t∈ [0 ;1 ] e) ρ=−2 cos(ϕ ), ϕ∈ [0 ;2 π ]
2. Solving equations & systems of equations:
а) x4+1=2(1+x)4; b){3 x+ y+2 z=3 ¿ {2 x+ y+2 z=2 ¿¿¿¿
3. Vectors:
а) α 1(0,5 ,−7) , α 2(1,3 ,−5 ) , Find ϕ = cornerα 1^α 2
b) α1(0,5 ,−3) , α 2(1,4,8) , Find α 1× α2 – vectorial product
c) α 1(1,3,5 ), α2(1,4 ,−8 ) ,α3 (−2 ,−3 ,−7 ) , Find α 1⋅α2⋅¿ ¿α 3– mixed product
4. Find f(X) & eigen numbers of matrix f(X)
f(X)=X3+X+5 , X=(1 1 43 2 13 3 1 )
5. Limits а) lim
n → π
sin (5 x )sin (2 x )
b) limx →0
e2x−1x
6. Find the derivative:
128
а) y=tg(x2 ) y x
' =? b) { y=t3−1 ¿¿¿¿ y x
'=?
c) {x=3 cos ( t )¿ ¿¿¿ y x' =? d)у3−ln ( ln ( x ))=0 y x
'=?
e) Z=arcsin ( x3+ y3 ) ∂ z∂ x
=? ∂ z∂ y
=?
7. Integrals:
а) ∫ dx
( x2+1 )32 b)
∫0
1 √ex dx√ex+e−x c)
∫1
+∞ √x dx(1+x )2
d) ∬
D
( xy 2 cos (x2 y )dxdy , D:
0≤x≤π2
0≤ y≤2 e) ∫0
∞
dx∫x
∞
e− y2dy
8. Complex numbers , polynomials:
а) Draw in (Re(W), Im(W)) hodograph: W=5 p
1+0 .1 ρр=iω ,ω∈[ 0 ,100 ]
b) Define L.C.D. of polynomials P4(x) = x4+x3−3 x2−4 x−1; P3(x) = x3+x2–x;
9. Analyze coincidence of rows:
а)∑n=1
e−3√4 ¿ ¿
b)∑n=2
∞ (−1)n−1
n2
c) Expand into Taylor row in the field x0: y = e2x, x0=4
d) Expand into Fourier row in the given interval: y=4−|x|, (−4,4 )
10. Solve differential equations & systems of equations:
а) 2 y ' '− y '=1 y (0)=0 , y '(0 )=1 b) (2 y+ xy3 )dx+( x+ x2 y2)dy=0
c) {dxdt= y ¿ ¿¿¿
129
130
Assignment № 9.
1. Draw graphs of functions:
а) y=( x2−4 )2 b) y=x2∗e1/x c) z =arctg ( x )+arcctg ( y ) d){x=e2 t *cos2( t ) ¿¿¿¿ t∈ [0 ;2 π ]
e) ρ=3*cos2(3 ϕ ); ϕ∈ [0 ;2 π /3 ]
2. Solving equations & systems of equations:
а) x4−2√3x2−x+3−√3=0
b) {4 x+ y+2 z=0 ¿ {3 x+ y+2 z=1 ¿¿¿¿
3. Vectors:
а) α1(1,2,4 ) , α2 (0 ,−5,1 ),Find ϕ = corner α 1^α 2
b) α 1(0,1,5 ) , α2(3 ,−7 ,−4 ) ,Find α 1× α2 – vectorial c) α 1(1,7,5 ), α 2(3,0,4 ) , α3(−1,−7 ,−2 ) ,Find α 1⋅α2⋅¿ ¿α 3– mixed product
4. Find f(X)=X3+2 X+3 , if
X =(1 5 43 2 01 2 1 ) Find eigen numbers of matrix f(X).
5. Limits а) limx→ 0
❑
b) limx→ ∞❑
6. Find the derivative :
131
а) y=sin2 ( x )sin( x2 ) y x
' =? b) {y=1
sin (t ) ¿¿¿¿
y x'=?
c) {x=e2 t cos2( t ) ¿ ¿¿¿ y x' =? d) x2+ y sin( x )+ y3=0 y x
'=?
д) z =e x / y+e y / x ∂ z∂ x
=? ∂ z∂ y
=?
7. Integrals:
а) ∫ xdx( x2−1)1/2 b)
∫0
1(3 x−7 )dx
( x3+4 x2+4 x+16)2 c) ∫1
∞ √x dx(1+x )2
d) ∬
Dx2 yexy dxdy ,
D: 0≤x≤10≤ y≤2 e)
∫0
∞
dx∫2 x
∞ xe− y sin ( y )dyy2
8. Complex numbers , polynomials:
а) Draw in (Re(W), Im(W)) hodograph:
W=0,1(1+0 , 01 p )
р р=iω , ω∈[ 0 ,200 ]b) Solve equation:
x4−4 x3+5 x2−2 x−6=0
9. Analyze coincidence of rows:
а) ∑n=1
∞
n2 e−√n
б) ∑n=2
∞
sin (πn/12 ) /ln(n )
c) Expand into Taylor row in the field x0: y=ln (cos( x )), x0=2 π
d) Expand into Fourier row in the given interval: y=3−|x|, (−3,3 )
10. Solve differential equations & systems of equations: а) y ' '−2 y=еx (x2+ x−3) , y (0 )=2 ; y ' (0)=2
132
b) y '=
(1+ y )2
x ( y+1)−x2
c) {y '=x+ y
z ¿¿¿¿
133
Assignment № 10.
1. Draw graphs of functions:
а) y=x2−x−6
x−2 б) y=ex
x+1 c) z =cos (x2+2 ) sin ( y2+2 )
d) {x=2 (t−sin ( t )) ¿ ¿¿¿ t∈ [0,2 π ] e) ρ=4 sin (ϕ ) ϕ∈ [0,2 π ]
2. Solving equations & systems of equations:
а) 4 x4−16 x3+3 x2+4 x−1=0
б) {3 x+2 y+z=4 ¿ {x+ y+2 z=0 ¿ ¿¿¿
3. Vectors :
а) α 1(3,0 ,−2) , α2 (4,5,8 ),Find ϕ = corner α 1^α 2
б) α 1(1,2,5 ), α2(−4,3,0 ) ,Find α 1× α2 – vectorial product c) α1(0,5,8 ) , α2(3 ,−2,4 ) , α3 (1,0,1) ,Find α 1⋅α2⋅¿ ¿α 3– mixed product
4. Find f(X)=X2+2 X+4 if
X= ( 1 3 4−2 5 71 2 3 ) Find eigen numbers of matrix f(X).
5. Limits а) limx→ ∞
❑
б) limx →2❑
6. Find the derivative:
134
а) y=sec2( x
2)+cos(sec2( x
2))
y x' =? б) { y=arctg( t ) ¿ ¿¿¿ y x
'=?
c) {x=5 ch (2t ) ¿¿¿¿ y x' =? d) y+tg (xy )+ y2=0 y x
' ( x )=?
e) z=ln √x2+ y2−x√ x2+ y2+x
∂ z∂ x
=? ∂ z∂ y
=?
7. Integrals:
а) ∫ dx√ x(1+x ) б)
∫0
5√2 x9 dx(1+x5 )3 c)
∫1
∞ ln( x2+1)x
dx
d) ∬
D
xsin ( x+ y )dxdy , D:
0≤x≤π
0≤ y≤π2 e)
∬D
ln √ x2+ y2
D: 0≤x≤20≤ y≤2
8. Complex numbers, polynomials:
а) Draw in (Re(W), Im(W)) hodograph:
W=5
p (1+0. 1 p ) р=iω , ω∈ (0 ,100 )
б) Expand into factors: p( x )=x 4+4 x3+4 x2+1
9. Analyze coincidence of rows:
а) ∑n=1
∞ sin( n)sin(n2)n б)
∑n=1
∞
2−(2 ln(n)+3 ln2(n))
10. Expand in Taylor row in the field x0: y=earctg(x ), x0=0
11. Solve differential equations & systems of equations:
а) y ' '−4 y'+5 y=xe2 x , y (0 )=1 ; y '( 0)=0
б) y '− y+ y2 cos( x )=0
135
c) {dxdt=x+4 y ¿ ¿¿¿
136
Assignment № 11.
1. Draw the graph of function.
а) y= x
1+x3 б) y=ln x
x+1 c) z=ln|x|+ ln|y|
d) {x=2cos3( t ) ¿ ¿¿¿ t∈[0,2π ]
e) ρ=2sin 3 ϕ , ϕ∈[0 , 2 π
3]
2. Solving equations & systems of equations.
a) (2 x2+3 x+1 )(3 x+1)=8 x4
б) {4 x+ y+2 z=−5 ¿ {3 x+ y+z=−2¿ ¿¿¿
3. Vectors.
a) α 1 (2,5,7 ) α 2(0,1,3) find Ψ=α 1 α2⏞
б) α 1 (-3,0,2) α 2(0,4,7) find α 1 ¿ α 2– vector of productc) α 1 (1,2,3)α 2(4,3,2)α 3 (-1,-2,-4) find α 1
α 2 α 3 – mixed product4. Find:
f(X)=X5+2 X2+ 1
X , если X=(1 2 54 3 08 9 10 )
Find eigen numbers of matrix f(x)
5. Limits a) limx→ ∞
❑ б) limx→ ∞❑
6. Derivatives.
a) y=[ 1−x2
2sin ( x )−(1−x )2
2cos( x )] e−x
y
x′=? б)
{ y=sin3 ( t )¿ ¿¿¿ y
x′=?
137
c) {x=3√1−t ¿ ¿¿¿ y
x′=?
d) x2+xy+ y3+5 y=0 y
x′=?
e) z=x y 2
∂ z∂ x
=? ∂ z∂ x
=?
7. Integrals.
а) ∫ dx
x ln ( x ) ln ( ln ( x ) ) б) ∫0
π2 sin( x )dx
1+cos ( x )+sin( x )
c) ∫0
∞
x2e− x dx г)
∬D
ex+ y dxdy D :0≤x≤1D :0≤ y≤1
d) ∫0
∞
∫0
∞
∫0
∞ dxdydz
√1+x+ y+z )7
8. Complex numbers , polynomials.а) Draw in (Re(W), Im(W)) hodograph
W=5
1+0 .1 p+0 .01 p2 p=iω ω=[0 , 100 ]б) Expand into factors
P4 ( x )= x4+4
9. Analyze coincidence of rows & expand:
а) ∑n=1
∞ (−1)n
n5
б) ∑n=1
∞ln2(sec( π
4) )
c) Expand into Taylor row in the field x0:
y=ecos( x ),
x0=π2
г) Expand into Fourier row in the given interval:y=2sin( x ), (−π , π )
10. Solve differential equations & systems of equations:а) y ' '+8 y '=8x y (0 )=0 , y ' (0 )=1
б) y '+2xy=2x3 y3
138
c) {∂ x∂ t
=5 x+8 y ¿¿¿¿
139
Assignment № 12.
1. Draw graphs of functions.
a) y = ( x+1)2
x−2 б) y =e2 x
(1+x )2 e) ρ =2sin2φ φ∈ [0 , π ]
c) z =arсcos(x+y)
d) {x=3 ch ( t )¿ ¿¿¿ t∈ [0 , 10 ]
2. Solving equations & systems of equations.
а) x4+5x3+2x2+5x+1=0
б) {4 x+ y+2 z=−5 ¿ {3 x+ y+2 z=−3 ¿ ¿¿¿3. Vectors.
а) α 1(−3,5,2), α 2 (0,1,5). Find ϕ=α 1 α 2 .б) α 1(−2,0,4 ), α 2 (1,1,3 ). Find α 1×α 2 – vectorial product.
c) α 1( 0,3,2), α 2 (1,2,7 ), α 3 (−1 ,−2,4 ). Find α 1 α 2 α 3 – mixed product.
4. Find f(X )= 13 X2+4X+2 , if X=
(1 −5 43 2 21 1 7 ) ,
Find eigen numbers of matrix f(X).
5. Limits.
а) limx→0
(sin ( x ))tg( x )
б)limx→∞
(1+ 3x)x
6. Derivatives.
а) y = ℮x(x2-2x+2) , ∂ y∂ x
=? б){ y=arcsin (t ) ¿ ¿ ¿¿,
∂ y∂ x
=?
140
c){x=arcsin (1
√1+t2)¿ ¿¿¿
, ∂ y∂ x
=? d) x3+ exy +cos(y2)=0,
∂ y∂ x
=?
e) z =√ x2+ y3, ∂ z∂ x
=? ∂ z∂ y
=?
7. Integrals.
а)∫ ex dx
2+ex б)∫0
2 arctg15 cos (x )dx(1+cos( x ))(1−sin( x )) c)
∫0
∞ xdx(1+x )3
d)∬
Д
dxdy( x+ y+1 )2 д :
0≤x≤10≤ y≤1
e)∬
Д
sin( x2+ y2 )
√( x2+ y2)3dxdy ,
д : 0≤x≤20≤ y≤x2
8. Complex numbers, polynomials.
а) Draw in (Re(w),Im(w)) hodograph :
w=
51+0,1 p2
,p=iω ,ω∈ [0 ,100 ]
б) Expand into factors: p4(x) = x4–10x2+1
9. Analyze the coincidence of rows.
а)
∑n=1
∞ 1
ln2(sin( 1n))
б) ∑n=1
∞ (−1)|n|
n5
c) Expand into Taylor row in the field x0:
y =1
4√1+x, x0=15
d) Expand into Fourier row in the given interval:
y=¿ {2 , при−π< x<0¿ ¿¿¿ (−π , π )
141
10. Solve differential equations &systems of equations . a) y ' '−3 y '+2 y=ex y (0 )=0 , y ' (0)=2
б)y '+ y
x+1+ y2=0
y (0 )=0 , y ' (0)=2
c){dxdt=2 x+3 y ¿ ¿¿¿
142
Assignment № 13.
1. Draw graphs of functions:
а) y =2 x3
x2−4 б) y =e√x+1 c) z =tg( x2+ y3 )
d){x=2 cos( t )¿ ¿¿¿ t∈ [0,2 π ]
e) ρ=√2|cos(2 ϕ )| ϕ∈ [0 , π ]
2. Solving equations & systems of equations:
а) x3−19 x−30=0
б) {4 x+3 y+2 z=−5 ¿ {x+3 y+5 z=12 ¿¿¿¿
3. Vectors:
а) α 1(0 ,−5,7) , α 2(1,4,1) ,Find ϕ =corner α 1^α 2
б) α 1(−3,0,4 ) , α2 (1,2,7 ) ,Find α 1× α2 – vectorial product
c) α 1(1,2,5 ), α 2(0,4,3 ) , α3 (1,−1,7 ),Find mixed product α 1⋅α2⋅¿ ¿α 3–
4. Find f(X)=15
X 4+2 X2+ 1X2 , if
X=(1 5 43 2 07 4 0 ) Find eigen numbers of matrix f(X).
5. Limits
а) limx →1❑
б) limx→ 0❑
143
6. Find the derivative:
а) y=e− x2
y '=? б) { y=arctg (t ) ¿ ¿¿¿ y x'=?
c) {x= t cos2( t )¿ ¿¿¿ y x' =? d) x3+ y2+ xy−2=0 y x
' ( x )=?
e) z=e x2+ y2
∂ z∂ x
=? ∂ z∂ y
=?
7. Integrals:
а) ∫ln2( x )
xdx
б) ∫1√2
1
arccos2( x )dx
c) ∫0
∞ dx(4+x2)2
d) ∬
D
x2
1+ y2 dxdy , D:
0≤x≤10≤ y≤1 e)
∬D
cos( x2+ y2)x2+ y2 dxdy
, D: 0≤x≤30≤ y≤sin (x )
8. Complex numbers, polynomials:
а) Draw in (Re(W), Im(W)) hodograph
W=5
1+0,1 p+0,2 р2 р=iω , ω∈ (0 ,100 )
б) Expand into factors:
P4 ( x )=x4+4 x3+4 x2+1
9. Analyze coincidence of rows:
а) ∑n=1
∞ ( ln( 1n3 )− ln(sin ( 1
n3 ))) б) ∑n=2
∞ sin ( πn12
)
ln(n)
c) Expand into Taylor row in the field x0: y=cos (2 x ) , x0=π
4
d) Expand into Fourier row in the given interval: y=x−1, (−1,1 )
144
10. Solve differential equations & systems of equations:
а) y ' ' '+2 y '+ y=−2 , y (0 )=0 , y ' (0)=1
б) (x2+ y2+ y )dx=xdy
c) {dxdt=3 x+3 y ¿ ¿¿¿
145
Assignment №14.
1. Draw graph of function
а) y= x2
x−4 б) y=1− ln ( x )
x c) z=ex2+ y5
d) {x=sin2( t ) ¿¿¿¿ t∈[0,2π ]
e) ρ =3(1-сos(ϕ ))
2. Solving equations & systems of equations.
a) б)
3. Vectors
a) α 1 (2,5,7 ) α 2 (0,1,3) find Ψ=α 1 α2⏞
б) α
1 (-3,0,2) α 2 (0,4,7) find α 1 ¿α 2 – vector of factor) α 1
(1,2,3)α 2 (4,3,2)α 3 (-1,-2,-4) Find α 1α 2 α 3 – mixed product
4. Find :
f(X)=X5+2 X2+ 1
X , if X=(1 2 54 3 08 9 10 )
Find eigen numbers of matrix f(X)
5. Limits a) limx→ ∞
❑ б) limx→ ∞❑
146
08696 2345 xxxxx
2355223
524
zyxzyx
zyx
6. Derivatives.
a) y=[ 1−x2
2sin ( x )−(1−x )2
2cos( x )] e−x
y
x′=?
б){ y=sin3( t )¿ ¿¿¿
y
x′=?
c) {x=3√1−t ¿ ¿¿¿ y
x′=?
d) x2+xy+ y3+5 y=0 y
x′=?
e) z=x y 2
∂ z∂ x
=? ∂ z∂ x
=?
7. Integrals.
а) ∫ dx
x ln ( x ) ln ( ln ( x ) ) б) ∫0
π2 sin( x )dx
1+cos ( x )+sin( x )
c) ∫0
∞
x2e− x dx d)
∬D
ex+ y dxdy D :0≤x≤1D :0≤ y≤1
e) ∫0
∞
∫0
∞
∫0
∞ dxdydz
√1+x+ y+z )7
8. Complex numbers, polynomials.а) Draw inв (Re(W), Im(W)) hodograph
W=5
1+0 .1 p+0 .01 p2 , p=iω ω=[0 , 100 ]
б) Expand into factors
P4 ( x )= x4+49. Analyze coincidence of rows & expand:
а) ∑n=1
∞ (−1)4
n5 б) ∑n=1
∞ln2(sec ( π
4) )
147
c) Expand into Taylor row in the field x0:
y=ecos( x ),
x0=π2
d) Expand into Fourier row in the given interval:y=2sin( x ), (−π , π )
10. Solve differential equations & systems of equations:а) y ' '+8 y '=8x y (0 )=0 , y ' (0 )=1
б) y '+2xy=2x3 y3
c) {∂ x∂ t
=5 x+8 y ¿¿¿¿
148
Assignment № 15.
1. Draw graphs of functions:
а) y=x2
x+1 б) y=e1
2−x c) z =x+√ y d){x=3 cos ( t )¿ ¿¿¿ t∈ [0,2 π ]
e) ρ=2sin3(ϕ ) ϕ∈ [0,2 π ]
2. Solving equations & systems of equations: а) x3−2 x2−19 x−30=0
б) {7 x+ y+3 z=23 ¿ {5 x+3 y+3 z=13 ¿ ¿¿¿
3. VECTORS:
а) α1(3 ,−5,2) , α2 (2,−3,4 ) ,findϕ = corner α 1^α2
б) α 1(3,0,2) , α 2(−5,4,3) ,find α 1× α2 – vectorial
c) α 1(1,2,3 ), α 2(3,4,5 ) ,α 3(−2,3,5 ) ,find α 1⋅α2⋅¿ ¿α 3– mixed
4. Find f(X)=X2+3 X+4 if
X=(1 3 34 5 67 8 9 ) Find eigen numbers of matrix f(X).
5. Limits
а) limx→ 0❑
б) limx→ 0❑
6. Find the derivative:
149
а) y =2 x
1−x2 y '=? б) {y=t
1+t ¿¿¿¿
y x'=?
c) {x=3√1−√t ¿¿¿¿ y x
' =? d) x2+2 xy− y2=2 x y x' ( x )=?
e) z=√ 1+x1+ y+x
, ∂ z∂ x
=? ∂ z∂ y
=?
7. Integrals:
а) ∫ xdx√1−x2 б)
∫−π
6
π6
еSinxsin (2 x )dx
c) ∫−∞
∞ dx(x2+1 )2
d) ∬
D
x3
( x+ y )3dxdy ,
D: 0≤x≤21≤ y≤4 e)
∫−∞
∞
∫−∞
∞ dxdy1+x2+ y2
8. Complex numbers , polynomials:
а) Draw in (Re(W), Im(W)) hodograph:
W =0,1 р
1+0,2 р2 р=iω , ω∈ (0 ,200 )
б) Calculate the roots & draw them in (Re,Im): x4+4 x3−4 x2−16 x−8=0
9. Analyze coincidence of rows:
а) ∑n=2
∞ √n+2−√n−2n3 б)
∑n=1
∞ ln100(n)n
sin( πn4)
c) Expand into Taylor row in the field x0: y =1x , x0=1
150
d) Expand into Fourier row in the given interval: y=sh(5 x ) , (−π ,π )
10. Solve differential equations & systems of equations:
а) y ' '−5 y '+6 y=(12 x−7 )е− x , y (0 )= y ' (0 )=0
б) (2 x3−xy 2 )dx+(2 y3−x2 y )dy=0
c) {dxdt= y−7 x ¿ ¿¿¿
151
The list of used sources:
1. Дьяконов В. MAPLE 7: учебный курс. – СПб.: Питер, 2002. 672 с.: ил.2. Дьяконов В.П. MAPLE 8 в математике, физике и образовании. – М.:
СОЛОН-Пресс, 2003. 656 с. (Серия «Полное руководство пользователя»).
3. Дьяконов В.П. MAPLE 9 в математике, физике и образовании. – М.: СОЛОН-Пресс, 2004. 688 с.
4. Говорухин В., Цибулин В. Компьютер в математическом исследовании. Учебный курс. – СПб.: Питер, 2001. 624 с.: ил.
5. Васильев А.Н. MAPLE 8. Самоучитель. – М.: Издательский дом «Вильямс», 2003. 352 с.: ил.
152
APPENDIX
Names of letters
Альфа alpha Alpha AБетта beta Beta BГамма gamma Gamma Дельта delta Delta DЭпсилон epsilon e Epsilon EДзэта zeta z Zeta ZЭта eta h Eta H
Тхэта theta q Theta QЙота iota i Iota IКаппа kappa k Kappa K
Ламбда lambda Lambda LМю mu Mu MНю nu Nu NКси xi x Xi X
Омикрон
omicron
o Omicron
O
Пи pi Pi PРо rho r Rho R
Сигма sigma s Sigma SТау tau Tau T
Ипсилон upsilon u Upsilon UФи phi j Phi FХи chi c Chi C
Пси psi y Psi YОмега omega Omega
Greek alphabet
153
Сергей Николаевич СтребуляевНадежда Львовна Орлова
КОМПЬЮТЕРНАЯ АЛГЕБРА «MAPLE»В ИНЖЕНЕРИИ
Учебно-методическое пособие
Федеральное государственное автономное образовательное учреждение высшего образования «Национальный исследовательский Нижегородский
государственный университет им. Н.И. Лобачевского».
603950, Нижний Новгород, пр. Гагарина, 23.
154