My Maple Cheat Sheet
Total Page:16
File Type:pdf, Size:1020Kb
my Maple cheat sheet Nasser M. Abbasi September 16, 2021 Compiled on September 16, 2021 at 12:15 Noon [public] Contents 17 How to use matrices in maple? 7 1 How to find a particular solution 18 How can maple return more to ODE? 1 than value from a procedure call? 9 2 How to find basis solutions for 19 How does maple handle proce- homogeneous ode? 1 dure arguments? 9 3 How to convert Mathematica ex- 20 How to define your own data pression to Maple? 1 types? 9 4 How to debug internal proce- 21 How to find max element in a ma- dures, such as dsolve? 2 trix and its position as same time? 10 5 How to display or print source 22 How to create a package? 10 code of a function or procedure in MAPLE? 2 23 How to convert from floating point to Hex? 12 6 How to display trace of a func- tion as it runs in maple? 3 24 How to find taylor series expan- sion of functions? 12 7 How to display a build in func- 25 How to print elements of a matrix? 12 tion code? 4 26 How to find determinant of ma- 8 How to build a LIST or a SET on trix? 13 the fly? 4 27 How to generate Hilber matrix? 13 9 How to make function display more information of what it is 28 How to plot matrix data? 13 doing? 4 29 How to catch an error from a 10 How to solve a differential equa- proc()? 13 tion with initial conditions? 5 30 How to convert 3456 to 3,456 ? 14 11 How to verify that the ODE so- lution given is correct? 5 31 How to use units ? 14 12 How to know the type of ODE? 6 32 On High precision. Using taylor to solve ODE 15 13 What packages to load for differ- ential equations? 6 33 How to evaluate catlan number and other sums? 15 14 How to plot solution of differen- tial equations? 6 34 How to write a text file that con- tains a package, and load it and 15 How to plot a function? 7 execute it? 15 16 How to run maple from com- 35 How to find what packages are mand line? 7 included in maple 16 1 2 36 How to plot the gradiant vector 59 Fourier series in maple 28 field? 16 60 How to plot graphs next to each 37 How to put the digits of Pi into others in a grid like fashion 29 a list? 17 61 How to generate Pi on X-axis 30 38 Digits of PI in maple and mma 17 62 How to make output from Func- 39 How to find where functions are? 19 tionAdvisor look better? 30 40 on maple data types 19 63 How to do partial fractions? 30 41 how to extract stuff from a list 64 How to generate sequence sum based on some selection? 20 symbolically 30 42 how to test if all elements of a 65 Nice plot from Maple 31 matrix are integers? 20 66 How to check if 2 expressions 43 how to use laplace transform? 20 are the same? 31 44 questions I have 21 67 converting series to factorials 31 45 3D plotting 21 68 How to find what new additions made to Maple? 32 46 How to raise each element in a list to a power? 21 69 Maple can’t solve laplace equa- 47 How to generate a sequence with tion and numerically 32 any increment? 21 70 Some Maple Matrix operations 32 48 What shortcuts are there for ma- trix manipulation? 21 71 How set diagonal elements to some value, say 1? 34 49 How to solve a set of equations for the derivative? 21 72 How to multiply roots of a poly- nomial? 35 50 How to solve a set of equations for differentials? 22 73 How to plot a surface in 3D? 35 51 How to plot binary tree 23 74 How to convert trigs to sinc func- tion in an expression 36 52 solving problem 12.4 chapter 4, Math 121A, Boas book. using 75 How to find NullSpace and maple 23 ColumnSpace of a matrix? 36 53 example of doing convergence 76 How to fix the interface to using test in maple 24 Maple notation for input? 37 54 Solving problem math 121A, ch 77 How to find all solutions using 14, 3.18, Boas book. contour inte- allvalues ? 37 gration 24 78 How to add one to only the ele- 55 How to find multiple roots to an ments of the diagonal of a matrix? 37 equation such as 푠푖푛(푥) = 0 24 79 How to search help for updates 56 Dr Basti Associated Legendre 25 on some package 37 57 Understanding conformal map- 80 How to work with groups in ping in maple 26 worksheet 37 58 Is there a way to keep the as- 81 How to read code into worksheet? 38 sumptions but not see the tilda character show up? 28 82 Code editors for Maple 38 3 83 How to find if package is mod- 106How to do pattern matching in ule or table? 38 Maple? 48 106.1Example 1 . 48 84 How to replace a string? 38 107How to find trig indetities? 48 85 How to use geometry and plot- tools ? 38 108How to find directional deriva- tive of scalar function? 49 86 How to simplify log expressions ? 39 109How to check if name is as- 87 How to simplify hyperbolic ex- signed a value? 49 pression ? 39 110How to use dsolve with Lie? 50 88 How to create text file and ap- pend string to it? 39 111How to select terms with sqrt or radical in them from an expression 50 89 How to search packages and li- braries? 39 112How to simplify 푒ln(푥)+ln(푦) 50 90 How to numerically solve a BVP 113How to find all csgn() and re- ode and plot the solution? 41 place them by 1 51 91 How to find the indicial equa- 114How to replace all abs(expr) by tion for an ODE? 42 expr 51 92 How to display on screen for spe- 115How to find basis for Null space, cific width? 42 Row space and column space of matrix? 51 93 Maple IDE links 42 116How to do Gaussian elimination 94 loading, remove and finding on a Matrix? 52 what packages loaded 43 117How to find Reduced Echelon 95 some rules of thumbs when us- form of a Matrix? 52 ing Maple 43 118How add a new row to bottom of 96 How to write derivative 43 matrix? 53 97 How to solve heat PDE in 1D in 119How to obtain list of all occu- Maple 2017? 43 rances of some function in an ex- pression? 53 98 How to make multiple assump- tions on a symbol? 45 120How to replace ln(|푥|) with ln(푥) in an expression? 54 99 How to make Maple display diff(y(x),x) as 푦′(푥) or as 푦′ ? 45 121How to find all signum func- tions in expression and simplify 100How to check if expression is an it? 54 equation? 45 122How to do change of variables 101How to check if expression is a on the dependent variable for an set? 45 ODE? 55 102How to set boundary conditions 123How to find the cofactor matrix for dsolve or pdsolve? 46 of a matrix? 55 103How to export a plot to PDF? 46 124How to make phase plot of sec- ond order ODE? 55 104How to find all roots of complex number 47 125How to normalize eigenvectors? 56 105How to convert matrix of matri- 126How to find if some function is ces to a matrix? 47 present in an expression 57 4 127How to find all functions in an 137How to write structured types to expression? 57 match some expressions? 61 137.1type for sin푚(푥) cos푛(푥) . 61 128How to find all functions in an expression but exclude all build 138How to use new object method in math functions? 57 calling in Maple 2021? 61 129How to obtain a list of all argu- 139How to make a constructor for ments of function? 58 an Object? 62 130How to obtain a list of all func- 140How to make different construc- tions in expression whose first tors for an Object? 63 argument is 푧? 58 141How to do OOP inheritance? 64 131How to obtain a list of all func- tions in expression whose sec- 142How to use object as user de- ond argument is 푡? 58 fined record inside a proc? 65 132How to typeset ℏ? 58 143Given an expression with in- 133How to find the Curl of a vector? 59 dexed variables, how to select only these variables? 66 134How to see all steps in finding RREF form of an augmented ma- 144How to show step by step for cal- trix? 59 culus problem? 66 135How to find column space of ma- 145How to obtain list of files with trix? 60 some extension in folder? 66 136How to use select with own type 146How to delete lines from text file to find subexpressions? 60 that contains some string? 67 1 How to find a particular solution to ODE? restart; ode:=diff(y(x),x)+y(x)^2*sin(x)-2*sin(x)/cos(x)^2 = 0; yp:=DETools:-particularsol(ode); To step into the code, do restart; ode:=diff(y(x),x)+y(x)^2*sin(x)-2*sin(x)/cos(x)^2 = 0; stopat(`DEtools/particularsol`); DETools:-particularsol(ode); To print it do print(`DEtools/particularsol`); 5 2 How to find basis solutions for homogeneous ode? Use the output=basis option ode:=diff(y(x),x$2)-x*diff(y(x),x)-x*y(x)=0; dsolve(ode,output=basis); 3 How to convert Mathematica expression to Maple? restart; with(MmaTranslator); #load the package FromMma(`Integrate[Cos[x],x]`); Or restart; with(MmaTranslator); #load the package convert(`Integrate[Cos[x],x]`, FromMma); 4 How to debug internal procedures, such as dsolve? f:=proc() eq:=x*diff(y(x),x)+y(x)=exp(2*x); dsolve(eq,y(x)); end proc; Then used the command stopat(f); then called the procedure f(); and now the de- bugger comes up.