# Symbolic algebra and Mathematics with Xcas

### Renée De Graeve, Bernard Parisse1,
Jay Belanger2
Sections written by Luka Marohnić3

© 2002, 2007 Renée De Graeve, Bernard Parisse
`renee.degraeve@wanadoo.fr`
`bernard.parisse@ujf-grenoble.fr`

# Contents

# Chapter 1 Index

# Index

- , 5.2.3
- ’, 5.12.3
- ’*’, 5.16.1
- ’+’, 5.11.1, 5.14.1, 5.16.1
- ’-’, 5.11.1, 5.14.1, 5.16.1
- ’/’, 5.16.1
- (), 5.38.1
- *, 5.16.1, 5.34.4, 5.41.7, 5.45.3
- *=, 4.6.5
- +, 5.4.9, 5.4.10, 5.11.1, 5.14.1, 5.16.1, 5.34.2, 5.38.7, 5.41.3, 5.45.2
- +,-,*,/,^, 5.9.2
- +=, 4.6.5
- +infinity, 5.1
- ,, 5.38.2
- -, 5.11.1, 5.14.1, 5.16.1, 5.34.3, 5.41.4, 5.45.2
- -=, 4.6.5
- ->, 4.7.1, 5.15.1
- -infinity, 5.1
- .*, 5.41.5, 5.45.9
- .+, 5.41.3, 5.45.2
- .-, 5.41.4, 5.45.2
- .., 5.37.1, 5.38.4
- ./, 5.41.6, 5.45.10
- .^, 5.45.11
- /, 5.16.1, 5.34.8, 5.34.11, 5.46.2
- //, 4.2
- /=, 4.6.5
- :;, 4.1
- :=, 4.6.2, 4.7.1, 5.15.1
- <, 5.2.2
- <=, 5.2.2
- ==, 5.2.2
- =>, 4.6.2, 4.7.1
- >, 5.2.2
- >=, 5.2.2
- ? :, 4.7.2
- ?:, 4.7.2
- [], 5.37.2, 5.38.3, 5.38.4, 5.38.6, 5.40, 5.40.12
- 5.14.2, 5.16.4
- 5.14.2, 5.16.5
- #, 10.4.4
- $, 5.14.2, 5.17.5, 5.38.5
- %, 5.6.11, 5.14.2, 5.34, 5.35
- %{ %}, 5.39.1
- &*, 5.45.3
- &&, 5.2.3
- &^, 5.45.7
- ^, 5.11.1, 5.14.1, 5.34.9, 5.45.7
- _, 9.1.1, 9.2.1
- !, 5.7.1
- !=, 5.2.2, 5.2.3
- ", 5.4.1
- Airy_Ai, 5.9.11
- Airy_Bi, 5.9.11
- a2q, 5.53.2
- abcuv, 5.28.12
- about, 4.6.8, 5.23.1
- abs, 5.11.5, 5.16.2, 11.14.10
- abscissa, 11.13.2, 12.12.1
- accumulate_head_tail, 7.1.10
- acos, 5.16.2, 5.22.1
- acos2asin, 5.22.7
- acos2atan, 5.22.8
- acosh, 5.16.2
- acot, 5.22.1
- acsc, 5.22.1
- add, 5.40.29
- additionally, 4.6.8
- additionally, 4.6.8
- adjoint_matrix, 5.50.9
- affix, 11.13.1
- alea, 7.3.1
- algvar, 5.58.4
- altitude, 11.7.9
- and, 4.6.8, 5.2.3
- angle, 11.14.4, 12.12.9
- angleat, 11.14.1
- angleatraw, 11.14.1
- animate, 6.17.1
- animate3d, 6.17.2
- animation, 6.17.3
- ans, 4.4
- append, 5.40.16
- apply, 5.40.32
- approx, 8.2
- arc, 11.11.2
- arccos, 5.16.2, 5.22.1
- arccosh, 5.16.2
- archive, 4.6.6
- arcLen, 5.17.2
- arcsin, 5.16.2, 5.22.1
- arcsinh, 5.16.2
- arctan, 5.16.2, 5.22.1
- arctanh, 5.16.2
- area, 11.14.6
- areaat, 11.14.1
- areaatraw, 11.14.1
- areaplot, 6.7, 11.14.5
- arg, 5.11.6, 11.14.11
- as_function_of, 5.16.6
- asc, 5.4.5
- asec, 5.22.1
- asin, 5.16.2, 5.22.1
- asin2acos, 5.22.9
- asin2atan, 5.22.10
- asinh, 5.16.2
- assert, 10.2.4
- assign, 4.6.2
- assume, 4.6.8, 5.23.1, 5.23.1, 10.1.3, 11.5
- at, 5.40.2, 5.45.12
- atan, 5.16.2, 5.22.1
- atan2acos, 5.22.12
- atan2asin, 5.22.11
- atanh, 5.16.2
- atrig2ln, 5.22.19
- augment, 5.40.15, 5.45.23
- auto_correlation, 5.25.2
- Beta, 5.9.8
- Binary, 5.14.3
- BlockDiagonal, 5.44.4
- bar_plot, 7.1.13
- bartlett_hann_window, 5.25.7
- barycenter, 11.6.9, 12.4.7
- barycentre, 5.11.10
- base, 5.5
- basis, 5.46.9
- batons, 7.2.2
- begin, 10.1.7
- bernoulli, 5.8.9
- betad, 7.4.10
- betad_cdf, 7.4.10
- betad_icdf, 7.4.10
- binomial, 5.7.2, 7.4.1
- binomial_cdf, 7.4.1
- binomial_icdf, 7.4.1
- bisection_solver, 8.4.1
- bisector, 11.7.11
- bit_depth, 5.24.6
- bitand, 5.3.1
- bitor, 5.3.1
- bitxor, 5.3.1
- black, 6.1.1
- blackman_harris_window, 5.25.8
- blackman_window, 5.25.9
- blockmatrix, 5.45.21
- blue, 6.1.1
- bohman_window, 5.25.10
- border, 5.45.26
- boxwhisker, 5.42, 5.45.31, 7.1.7
- break, 10.3.6, 10.5.1
- breakpoint, 10.5.1
- brent_solverbrent_solver, 8.4.2
- bvpsolve, 8.3.6
- Circle, 11.11.3
- ClrGraph, 10.4.7
- ClrIO, 10.2.6
- CopyVar, 4.6.7
- c1oc2, 5.10.11
- c1op2, 5.10.9
- camembert, 7.1.14
- canonical_form, 5.12.6
- case, 10.3.2
- cat, 5.4.8, 5.4.10
- catch, 10.4.9
- cauchy, 7.4.12
- cauchy_cdf, 7.4.12
- cauchy_icdf, 7.4.12
- cauchyd, 7.4.12
- cauchyd_cdf, 7.4.12
- cauchyd_icdf, 7.4.12
- cd, 4.8.1
- cdf, 7.4.20
- ceil, 5.16.2
- ceiling, 5.16.2
- center, 11.6.11
- center2interval, 5.37.4
- centered_cube, 12.17.2
- centered_tetrahedron, 12.17.1
- cFactor, 5.12.10
- changebase, 5.46.8
- channel_data, 5.24.7
- channels, 5.24.6
- char, 5.4.6
- charpoly, 5.50.6
- chinrem, 5.28.13
- chisquare, 7.4.7
- chisquare_cdf, 7.4.7
- chisquare_icdf, 7.4.7
- chisquaret, 7.5.4
- cholesky, 5.52.1
- chrem, 5.6.23
- circle, 11.11.1, 12.10
- circumcircle, 11.11.5
- classes, 7.1.8
- coeff, 5.27.3
- coeffs, 5.27.3
- col, 5.45.14
- colDim, 5.45.34
- coldim, 5.45.34
- collect, 5.27.12
- colNorm, 5.49.4
- colnorm, 5.49.4
- color, 6.1.1, 11.3.3
- , 8.4.2
- colspace, 5.46.14
- comb, 5.7.2
- combine, 5.21.2
- comDenom, 5.31.7
- comment, 4.2
- comments, 4.2, 10.2.1
- common_perpendicular, 12.5.8
- companion, 5.50.10
- compare, 10.2.5
- complexroot, 5.32.1
- concat, 5.40.15, 5.45.23
- cone, 12.15.1
- confrac, 5.8.7
- conique, 5.53.5
- conique_reduite, 5.53.6
- conj, 5.11.8
- conjugate_equation, 5.19.4
- cont, 10.5.1
- contains, 5.40.24
- content, 5.27.10
- contourplot, 6.8
- convert, 5.5, 5.22.24, 5.27.22, 9.1.4
- convertir, 5.22.24, 5.27.22
- convex, 5.19.1
- convexhull, 11.10.5
- convolution, 5.25.3
- coordinates, 11.13.4, 12.12.4
- copy, 4.6.4
- correlation, 7.2.1
- cos, 5.22.1
- cos, 5.21.2, 5.22.24
- cosh, 5.16.2, 5.16.2
- cosine_window, 5.25.11
- cot, 5.22.1
- cote, 12.12.3
- count, 5.40.25, 5.45.27
- count_eq, 5.40.26, 5.45.28
- count_inf, 5.40.27, 5.45.29
- count_sup, 5.40.28, 5.45.30
- courbe_polaire, 6.12
- covariance, 7.2.1
- covariance_correlation, 7.2.1
- crationalroot, 5.32.4
- createwav, 5.24.1
- cross, 5.41.8
- cross_correlation, 5.25.1
- cross_ratio, 11.17.2
- crossP, 5.41.8
- crossproduct, 5.41.8
- cSolve, 5.55.7
- csc, 5.22.1
- cube, 12.16.1
- cumSum, 5.4.3, 5.40.30, 5.45.5
- cumulated_frequencies, 7.1.12
- curl, 5.54.5
- cyan, 6.1.1
- cycle2perm, 5.10.4
- cycleinv, 5.10.14
- cycles2permu, 5.10.3
- cyclotomic, 5.28.14
- cylinder, 12.15.3
- cZzeros, 5.12.12
- Delete, 5.14.3
- DelFold, 4.8.3
- Det, 5.35.5
- DIGITS, 5.9.1, 8.2
- Digits, 5.9.1, 8.2
- Disp, 10.2.6
- DispG, 3.7.3, 10.4.7
- DrawFunc, 6.2
- DrawParm, 6.11, 6.11.2
- DrawPol, 6.12
- DrwCtour, 6.8
- debug, 10.5.1
- debugger, 10.1.7
- default, 10.3.2
- degree, 5.27.4
- delcols, 5.45.15
- delrows, 5.45.15
- deltalist, 5.40.38
- denom, 5.8.4, 5.31.4
- densityplot, 6.9
- derive, 5.17.5, 5.54.1
- deriver, 5.17.5, 5.54.1
- deSolve, 5.57.1
- desolve, 5.57.1
- det, 5.34.15, 5.46.4
- det_minor, 5.46.5
- dfc, 5.8.7
- dfc2f, 5.8.8
- diag, 5.44.4
- diff, 5.17.5, 5.54.1
- dim, 5.45.32
- directories, 4.8
- display, 6.1.1, 11.3.3
- distance, 11.14.2, 12.12.7
- distance2, 11.14.3, 12.12.8
- distanceat, 11.14.1
- distanceatraw, 11.14.1
- divergence, 5.54.4
- divide, 5.28.6
- divis, 5.28.1
- division_point, 11.17.1
- divisors, 5.6.9
- divpc, 5.36.1
- dnewton_solverdnewton_solver, 8.5.1
- dodecahedron, 12.17.4
- dot, 5.41.7
- dot_paper, 11.2.4
- dotP, 5.41.7
- dotprod, 5.41.7
- droit, 5.55.5
- dsolve, 5.57.1
- duration, 5.24.6
- ERROR, 10.4.9
- e, 5.1
- e2r, 5.27.2
- egcd, 5.28.11
- egv, 5.50.3
- egvl, 5.50.2
- eigenvals, 5.50.1
- eigenvalues, 5.50.2
- eigenvectors, 5.50.3
- eigenvects, 5.50.3
- eigVc, 5.50.3
- eigVl, 5.50.2
- element, 11.6.14
- elif, 10.3.1
- ellipse, 11.12.1, 12.11.1
- else, 10.3.1
- end, 10.1.7, 10.3.1
- endfunction, 10.1.2
- envelope, 11.18.2
- epsilon, 5.58.1
- epsilon2zero, 5.58.1
- equal, 5.55.1
- equal2diff, 5.55.2
- equal2list, 5.55.3
- equation, 11.13.7, 12.12.5
- equilateral_triangle, 11.8.4, 12.7.4
- erase, 11.2.1
- erf, 5.9.5
- erfc, 5.9.6
- error, 10.4.9
- euler, 5.6.25
- euler_lagrange, 5.19.2
- eval, 5.12.1
- evala, 5.12.2
- evalb, 5.2.5
- evalc, 5.11.4
- evalf, 4.6.8, 5.8.1, 5.9.1, 5.58.6, 8.2
- evalm, 5.45.1
- even, 5.6.13
- exact, 5.8.1, 5.58.7
- excircle, 11.11.6
- exp, 5.16.2
- exp, 5.21.2, 5.22.24
- exp2list, 5.2.4
- exp2pow, 5.26.8
- exp2trig, 5.22.13
- expand, 5.12.5
- expexpand, 5.26.2
- expln, 5.22.24
- exponential, 7.4.14
- exponential_cdf, 7.4.14
- exponential_icdf, 7.4.14
- exponential_regression, 7.2.5
- exponential_regression_plot, 7.2.5
- exponentiald, 7.4.14
- exponentiald_cdf, 7.4.14
- exponentiald_icdf, 7.4.14
- expr, 5.4.11, 10.4.5
- expression editor, 4.3.1
- expression tree, 4.3.2
- extract_measure, 11.14.1
- extrema, 5.48.2
- ezgcd, 5.28.9
- FALSE, 5.2.1
- Factor, 5.35.4
- f2nd, 5.8.5, 5.31.5
- faces, 12.16.7
- factor, 5.12.9, 5.27.13, 5.34.14, 5.34.19
- factor_xn, 5.27.9
- factorial, 5.6.1, 5.7.1
- factoriser, 5.27.13, 5.34.14
- factors, 5.27.15
- false, 5.2.1
- falsepos_solverfalsepos_solver, 8.4.3
- fclose, 10.4.3
- fcoeff, 5.33.2
- fdistrib, 5.12.5
- feuille, 5.15.3, 5.37.2
- fft, 5.23.3
- fieldplot, 6.14
- filled, 6.1.1
- fisher, 7.4.8
- fisher_cdf, 7.4.8
- fisher_icdf, 7.4.8
- fisherd, 7.4.8
- fitdistr, 7.4.23
- float2rational, 5.8.1, 5.58.7
- floor, 5.16.2
- fMax, 5.17.3
- fMin, 5.17.3
- foldl, 5.40.34
- foldr, 5.40.34
- fopen, 10.4.3
- for, 10.3.3
- fourier_an, 5.23.1
- fourier_bn, 5.23.1
- fourier_cn, 5.23.1
- fPart, 5.16.2
- fprint, 10.4.3
- frac, 5.16.2
- fracmod, 5.34.12
- frame_2d, 11.2.3
- frame_3d, 12.3.1
- frames, 6.17.1, 6.17.2
- frequences, 7.1.11
- frequences_cumulees, 7.1.12
- frequencies, 7.1.11
- froot, 5.33.1
- fsolve, 8.4, 8.5
- fullparfrac, 5.22.24
- funcplot, 6.2, 12.15.5
- function, 10.1.2
- function_diff, 5.17.1
- functions, 10.1.2
- fxnd, 5.8.5, 5.31.5
- Gamma, 5.9.7
- Gcd, 5.6.3, 5.28.8, 5.35.3
- GetFold, 4.8.3
- GF, 5.34.18
- Graph, 6.2
- gammad, 7.4.9
- gammad_cdf, 7.4.9
- gammad_icdf, 7.4.9
- gauche, 5.55.4
- gauss, 5.53.3
- gaussian_window, 5.25.12
- gaussjord, 5.56.3
- gbasis, 5.30.1
- gcd, 5.6.2, 5.28.7, 5.34.13
- gcdex, 5.28.11
- genpoly, 5.30.3
- geometric, 7.4.11
- geometric_cdf, 7.4.11
- geometric_icdf, 7.4.11
- getDenom, 5.8.4, 5.31.3
- getKey, 10.2.3
- getNum, 5.8.3, 5.31.1
- getType, 10.2.5
- grad, 5.54.1
- gramschmidt, 5.53.4
- graphe_suite, 6.13
- greduce, 5.30.2
- green, 6.1.1
- grid_paper, 11.2.6
- groupermu, 5.10.16
- hadamard, 5.45.8
- half_cone, 12.15.2
- half_line, 12.5.2
- halftan, 5.22.17
- halftan_hyp2exp, 5.22.18
- halt, 10.5.1
- hamdist, 5.3.2
- hamming_window, 5.25.13
- hann_poisson_window, 5.25.14
- hann_window, 5.25.15
- harmonic_conjugate, 11.17.4
- harmonic_division, 11.17.3
- has, 5.58.5
- hasard, 5.7.4, 7.3.1
- head, 5.4.2, 5.40.4
- hermite, 5.29.2
- hessenberg, 5.50.11
- hessian, 5.54.3
- heugcd, 5.28.9
- hexagon, 11.10.1, 12.9.1
- highpass, 5.25.5
- hilbert, 5.44.6
- histogram, 7.1.9
- histogramme, 7.1.9
- hold, 5.12.3
- homothety, 11.15.5, 12.14.5
- horner, 5.27.16
- hybrid_solverhybrid_solver, 8.5.2
- hybridj_solverhybridj_solver, 8.5.5
- hybrids_solverhybrids_solver, 8.5.3
- hybridsj_solverhybridsj_solver, 8.5.6
- hyp2exp, 5.26.1
- hyperbola, 11.12.2, 12.11.2
- IFTE, 4.7.2
- InputStr, 10.2.2
- Int, 5.18.1
- Inverse, 5.35.6
- i, 5.1
- iabcuv, 5.6.21
- ibasis, 5.46.10
- ibpdv, 5.18.4
- ibpu, 5.18.4
- icdf, 7.4.21
- ichinrem, 5.6.22
- ichrem, 5.6.22
- icomp, 5.6.28
- icosahedron, 12.17.5
- id, 5.16.2
- identity, 5.44.1
- idivis, 5.6.9
- idn, 5.44.1
- iegcd, 5.6.20
- if, 10.3.1
- ifactor, 5.6.6
- ifactors, 5.6.7
- ifft, 5.23.4
- ifte, 4.7.2
- igcd, 5.6.2
- igcdex, 5.6.20
- ihermite, 5.50.12
- ilaplace, 5.57.2
- im, 5.11.3
- imag, 5.11.3
- image, 5.46.11
- implicitplot, 6.10
- in, 10.5.1
- incircle, 11.11.4
- indets, 5.58.2
- inequationplot, 6.6
- infinity, 5.1
- input, 10.2.2
- inString, 5.4.7
- int, 5.18.1
- intDiv, 5.6.10
- integer, 5.23.1
- integer, 4.6.8
- integrate, 5.18.1
- inter, 11.6.6, 12.4.4
- interactive_odeplot, 6.16
- interactive_plotode, 6.16
- internal directories, 4.8.3
- interp, 5.27.26
- intersect, 5.39.3
- interval2center, 5.37.3
- inv, 5.34.11, 5.34.16, 5.46.2
- inverse, 5.34.16
- inversion, 11.15.7, 12.14.7
- iPart, 5.16.2
- iquo, 5.6.10
- iquorem, 5.6.12
- irem, 5.6.11
- is_collinear, 11.16.2, 12.13.6
- is_concyclic, 11.16.3, 12.13.7
- is_conjugate, 11.16.14
- is_coplanar, 12.13.2
- is_cospherical, 12.13.8
- is_cycle, 5.10.7
- is_element, 11.16.1, 12.13.1
- is_equilateral, 11.16.5, 12.13.9
- is_harmonic, 11.16.15
- is_harmonic_circle_bundle, 11.16.17
- is_harmonic_line_bundle, 11.16.16
- is_inside, 11.16.4
- is_isosceles, 11.16.6, 12.13.10
- is_orthogonal, 11.16.13, 12.13.5
- is_parallel, 11.16.11, 12.13.3
- is_parallelogram, 11.16.10, 12.13.14
- is_permu, 5.10.6
- is_perpendicular, 11.16.12, 12.13.4
- is_prime, 5.6.16
- is_pseudoprime, 5.6.15

- is_rectangle, 11.16.7, 12.13.11
- is_rhombus, 11.16.9, 12.13.13
- is_square, 11.16.8, 12.13.12
- ismith, 5.50.13
- isobarycenter, 11.6.10, 12.4.6
- isom, 5.51.1
- isopolygon, 11.10.2, 12.9.2
- isosceles_triangle, 11.8.2, 12.7.2
- ithprime, 5.6.19
- JordanBlock, 5.44.5
- jacobi_equation, 5.19.3
- jacobi_symbol, 5.6.27
- jordan, 5.50.5
- jusqua, 10.3.4
- kde, 7.4.22
- ker, 5.46.12
- kernel, 5.46.12
- kernel_density, 7.4.22
- kill, 10.5.1
- kolmogorovd, 7.4.16
- kolmogorovt, 7.5.5
- kovacicsols, 5.57.3
- LaTeX, 3.7.1
- Line, 11.7.3
- LineHorz, 6.5.2
- LineTan, 6.5.4
- LineVert, 6.5.3
- LU, 5.52.5
- l1norm, 5.41.1
- l2norm, 5.41.1, 5.49.1
- lagrange, 5.27.26
- laguerre, 5.29.3
- laplace, 5.57.2
- laplacian, 5.54.2
- lcm, 5.6.5, 5.28.10
- lcoeff, 5.27.6
- ldegree, 5.27.5
- left, 5.37.2, 5.55.4
- legend, 11.3.3
- legendre, 5.29.1
- legendre_symbol, 5.6.26
- length, 5.40.13
- lgcd, 5.6.4
- lhs, 5.55.4
- ligne_polygonale, 7.2.3
- limit, 5.20.1, 5.20.2, 5.20.2
- lin, 5.26.4
- line, 6.5.1, 11.7.1, 12.5.1
- line_inter, 11.6.5, 12.4.3
- line_paper, 11.2.5
- line_segments, 12.16.8
- linear_interpolate, 7.2.3
- linear_regression, 7.2.4
- linear_regression_plot, 7.2.4
- linsolve, 5.56.6
- list2mat, 5.40.39
- listplot, 7.2.3
- lists, 5.40
- lll, 5.52.7
- ln, 5.16.2
- ln, 5.21.2, 5.22.24
- lname, 5.58.2
- lncollect, 5.26.5
- lnexpand, 5.26.3
- load, 4.8.2
- local, 10.1.2
- locus, 11.18.1
- log, 5.16.2
- log, 5.21.2
- log10, 5.16.2
- logarithmic_regression, 7.2.6
- logarithmic_regression_plot, 7.2.6
- logb, 5.16.2
- logistic_regression, 7.2.9
- logistic_regression_plot, 7.2.9
- loi_normal, 7.4.5
- lowpass, 5.25.4
- lpsolve, 5.47.2
- lu, 5.52.4
- lvar, 5.58.3
- Maple, 3.7.6
- MathML, 3.7.4
- magenta, 6.1.1
- makelist, 5.40.36, 10.4.1
- makemat, 5.45.24
- makesuite, 5.40.11
- makevector, 5.40.12
- map, 5.40.32
- maple_ifactors, 5.6.8
- markov, 7.4.24
- mat2list, 5.40.40, 5.40.40
- mathmml, 3.7.4
- matrix, 5.45.25
- matrix, 5.22.24
- max, 5.16.2
- maximize, 5.48.1
- maxnorm, 5.41.1, 5.49.2
- mean, 5.42, 5.45.31, 7.1.1
- median, 5.42, 5.45.31, 7.1.4
- median_line, 11.7.8
- member, 5.40.23
- mgf, 7.4.19
- mid, 5.4.2, 5.40.3, 5.40.3
- midpoint, 11.6.8, 12.4.5
- min, 5.16.2
- minimax, 5.48.4
- minimize, 5.48.1
- minus, 5.39.4
- mkisom, 5.51.2
- mksa, 9.1.3
- mod, 5.6.11, 5.35
- modgcd, 5.28.9
- mods, 5.6.11
- mRow, 5.45.18
- mRowAdd, 5.45.19
- mul, 5.40.31
- mult_c_conjugate, 5.11.9
- mult_conjugate, 5.12.7
- multinomial, 7.4.3
- mustache, 7.1.7
- NewFold, 4.8.3
- Nullspace, 5.46.13
- nCr, 5.7.2
- ncols, 5.45.34
- nDeriv, 8.3.2
- negbinomial, 7.4.2
- negbinomial_cdf, 7.4.2
- negbinomial_icdf, 7.4.2
- newList, 5.40.35
- newMat, 5.44.2
- newton, 8.3.1
- newton_solvernewton_solver, 8.4.4
- newtonj_solvernewtonj_solver, 8.5.4
- nextprime, 5.6.17
- nInt, 8.3.3
- nlpsolve, 5.48.3
- nodisp, 4.1, 11.4
- noise removal, 5.25.22
- nop, 5.38.6
- nops, 5.40.13
- norm, 5.41.1, 5.49.1
- normal, 5.12.13, 5.34.1, 5.34.2, 5.34.3, 5.34.4, 5.34.9
- normal_cdf, 7.4.5
- normal_icdf, 7.4.5
- normald, 7.4.5
- normald_cdf, 7.4.5
- normald_icdf, 7.4.5
- normalize, 5.11.7, 5.41.2, 11.14.12
- normalt, 7.5.2
- not, 5.2.3
- nPr, 5.7.3
- nrows, 5.45.33
- nSolve, 8.4
- nstep, 6.2
- nuage_points, 7.2.2
- nullspace, 5.46.12
- numer, 5.8.3, 5.31.2
- Output, 10.2.2
- Ox_2d_unit_vector, 11.2.3
- Ox_3d_unit_vector, 12.3.1
- Oy_2d_unit_vector, 11.2.3
- Oy_3d_unit_vector, 12.3.1
- Oz_3d_unit_vector, 12.3.1
- octahedron, 12.17.3
- odd, 5.6.14
- odeplot, 6.15
- odesolve, 8.3.4, 8.3.5
- of, 5.40.32
- op, 5.15.3, 5.37.2, 5.40.11
- open_polygon, 11.10.4, 12.9.4
- or, 4.6.8, 5.2.3
- ord, 5.4.4
- order_size, 5.36.2, 5.36.3
- ordinate, 11.13.3, 12.12.2
- orthocenter, 11.6.7
- orthogonal, 12.5.7
- output, 10.2.2
- Pause, 10.4.8
- Psi, 5.9.9
- p1oc2, 5.10.10
- p1op2, 5.10.8
- pa2b2, 5.6.24
- pade, 5.36.5
- parabola, 11.12.3, 12.11.3
- parallel, 11.7.5, 12.5.5
- parallelepiped, 12.16.3
- parallelogram, 11.9.4, 12.8.4
- parameq, 11.13.8, 12.12.6
- paramplot, 6.11, 6.11.2, 12.15.6
- parfrac, 5.22.24
- pari, 5.8.10
- part, 5.12.19
- partfrac, 5.31.9
- partfrac, 5.22.24
- parzen_window, 5.25.16
- pcar, 5.50.6
- pcar_hessenberg, 5.50.7
- pcoef, 5.27.20
- pcoeff, 5.27.20
- perimeter, 11.14.7
- perimeterat, 11.14.1
- perimeteratraw, 11.14.1
- perm, 5.7.3
- perminv, 5.10.13
- permu2cycles, 5.10.2
- permu2mat, 5.10.5, 5.52.4
- permuorder, 5.10.15
- perpen_bisector, 11.7.10, 12.6.2
- perpendicular, 11.7.6, 12.5.6
- peval, 5.27.8
- phi, 5.6.25
- pi, 5.1
- piecewise, 4.7.2
- piecewise defined functions, 4.7.2
- pivot, 5.56.5
- plane, 12.6.1
- playsnd, 5.24.4, 13.1.3
- plot, 6.3
- plot3d, 6.4
- plotarea, 6.7, 11.14.5
- plotcontour, 6.8
- plotdensity, 6.9
- plotfield, 6.14
- plotfunc, 5.17.4, 6.2
- plotimplicit, 6.10
- plotinequation, 6.6
- plotlist, 7.2.3
- plotode, 6.15
- plotparam, 6.11, 6.11.2
- plotpolar, 6.12
- plotseq, 5.13.2, 6.13
- plotspectrum, 5.24.10
- plotwav, 5.24.9
- pmin, 5.50.8
- point, 11.6.2, 12.4.1
- point2d, 11.6.3
- point3d, 12.4.2
- point_milieu, 6.7
- point_polar, 11.6.4
- poisson, 7.4.4
- poisson_cdf, 7.4.4
- poisson_icdf, 7.4.4
- poisson_window, 5.25.17
- polar, 11.17.5
- polar_coordinates, 11.13.6
- polar_point, 11.6.4
- polarplot, 6.12
- pole, 11.17.5
- poly2symb, 5.27.1
- polyEval, 5.27.8
- polygon, 11.10.3, 12.9.3
- polygonplot, 7.2.3
- polyhedron, 12.16.5
- polynom, 5.22.24, 5.27.22
- polynomial_regression, 7.2.8
- polynomial_regression_plot, 7.2.8
- potential, 5.54.6
- pow2exp, 5.26.7
- power_regression, 7.2.7
- power_regression_plot, 7.2.7
- powermod, 5.34.10
- powerpc, 11.11.7
- powexpand, 5.26.6
- powmod, 5.34.10
- prepend, 5.40.17
- preval, 5.12.18
- prevprime, 5.6.18
- primpart, 5.27.11
- print, 10.2.6
- prism, 12.16.4
- product, 5.40.31, 5.45.6, 5.45.8
- program, 10.1.5
- projection, 11.15.8, 12.14.8
- proot, 8.6
- propFrac, 5.8.2
- propfrac, 5.8.2, 5.31.8
- psrgcd, 5.28.9
- ptayl, 5.27.17
- purge, 4.6.8, 4.6.9, 5.23.1, 10.1.3
- pwd, 4.8.1
- pyramid, 12.16.2
- QR, 5.52.3
- Quo, 5.28.3, 5.35.1
- q2a, 5.53.1
- qr, 5.52.2
- quadrilateral, 11.9.5
- quadrique, 5.53.7
- quadrique_reduite, 5.53.8
- quantile, 5.42, 5.45.31, 7.1.6
- quartile1, 7.1.5
- quartile3, 7.1.5
- quartiles, 5.42, 5.45.31, 7.1.5
- quest, 4.4
- quo, 5.28.2, 5.34.5
- quorem, 5.28.6, 5.34.7
- quote, 5.4.1, 5.12.3
- RandSeed, 7.3.2
- Rem, 5.28.5, 5.35.2
- Rref, 5.35.7
- r2e, 5.27.1
- radical_axis, 11.11.8
- radius, 11.14.9
- rand, 5.7.4, 7.3.1
- randbinomial, 7.3.3
- randexp, 7.3.7
- randMat, 5.44.3, 7.3.8
- randmarkov, 7.4.25
- randmatrix, 5.44.3, 7.3.8
- randmultinomial, 7.3.4
- randNorm, 7.3.6
- randnorm, 7.3.6
- random, 7.3.1
- random_variable, 7.3.9
- randPoly, 5.27.23
- randperm, 5.10.1
- randpoisson, 7.3.5
- randpoly, 5.27.23
- randseed, 7.3.2
- randvar, 7.3.9
- randvector, 5.40.37
- rank, 5.46.6
- ranm, 5.27.25, 5.44.3, 7.3.8
- rat_jordan, 5.50.4
- rationalroot, 5.32.3
- ratnormal, 5.12.15
- rdiv, 5.9.3
- re, 5.11.2
- read, 4.8.2
- readrgb, 13.2.2
- readwav, 5.24.2, 13.1.1
- real, 5.11.2
- realroot, 5.32.2
- reciprocation, 11.17.6
- rectangle, 11.9.3, 12.8.3
- rectangle_droit, 6.7
- rectangle_gauche, 6.7
- rectangular_coordinates, 11.13.5
- red, 6.1.1
- ref, 5.56.2
- reflection, 11.15.3, 12.14.3
- rem, 5.28.4, 5.34.6
- remain, 5.6.11
- remove, 5.40.22
- reorder, 5.27.24
- repeat, 10.3.4
- repeter, 10.3.4
- resample, 5.24.8
- residue, 5.36.4
- resoudre, 5.12.9, 5.54.1, 6.5.6
- restart, 4.6.9
- resultant, 5.28.19
- return, 10.1.2
- reverse_rsolve, 5.56.7
- revlist, 5.40.7
- rhombus, 11.9.2, 12.8.2
- rhs, 5.55.5
- riemann_window, 5.25.18
- right, 5.37.2, 5.55.5
- right_triangle, 11.8.3, 12.7.3
- rm_all_vars, 4.6.9
- rmbreakpoint, 10.5.1
- rmbrk, 10.5.1
- rmwatch, 10.5.1
- rmwtch, 10.5.1
- romberg, 8.3.3
- root, 5.9.4
- rootof, 5.27.18
- roots, 5.27.19
- rotate, 5.40.8
- rotation, 11.15.4, 12.14.4
- round, 5.16.2
- row, 5.45.14
- rowAdd, 5.45.17
- rowDim, 5.45.33
- rowdim, 5.45.33
- rowNorm, 5.49.3
- rownorm, 5.49.3
- rowSwap, 5.45.20
- rowspace, 5.46.15
- rref, 5.34.17, 5.56.3
- SetFold, 4.8.3
- SortA, 5.40.19
- SortD, 5.40.20
- Store, 4.6.2
- samplerate, 5.24.6
- scalar_product, 5.41.7
- scalarProduct, 5.41.7
- scatterplot, 7.2.2
- sec, 5.22.1
- secant_solversecant_solver, 8.4.5
- segment, 11.7.3, 11.7.4, 12.5.3
- select, 5.40.21
- semi_augment, 5.45.22
- seq, 5.38.5
- seq[], 5.38.1
- seqplot, 6.13
- series, 5.36.3
- set[], 5.39.1
- shift, 5.40.9
- sign, 5.16.2
- signature, 5.10.12
- similarity, 11.15.6, 12.14.6
- simp2, 5.8.6, 5.31.6
- simplex_reduce, 5.47
- simplify, 5.12.14, 5.22.5
- simult, 5.56.4
- sin, 5.16.2, 5.22.1
- sin, 5.21.2, 5.22.24
- sincos, 5.22.13
- sincos, 5.22.24
- single_inter, 11.6.5, 12.4.3
- sinh, 5.16.2
- size, 5.40.13
- sizes, 5.40.14
- slope, 11.14.8
- slopeat, 11.14.1
- slopeatraw, 11.14.1
- smod, 5.6.11
- snedecor, 7.4.8
- snedecor_cdf, 7.4.8
- snedecor_icdf, 7.4.8
- snedecord, 7.4.8
- solve, 5.12.9, 5.54.1, 5.55.6, 6.5.6
- sommet, 5.15.3, 5.37.2
- sort, 5.40.18
- soundsec, 13.1.4
- sphere, 12.15.4
- spline, 5.27.28
- split, 5.12.8
- spreadsheet, 4.5
- sq, 5.16.2
- sqrfree, 5.27.14
- sqrt, 5.16.2
- square, 11.9.1, 12.8.1
- srand, 7.3.2
- sst, 10.5.1
- stdDev, 7.1.3
- stddev, 5.42, 5.45.31
- stddevp, 5.42, 7.1.3
- stdev, 7.1.2
- steffenson_solversteffenson_solver, 8.4.6
- stereo2mono, 5.24.5
- sto, 4.6.2
- string, 10.4.6
- string, 5.22.24
- student, 7.4.6
- student_cdf, 7.4.6
- student_icdf, 7.4.6
- studentd, 7.4.6
- studentt, 7.5.3
- sturm, 5.28.15
- sturmab, 5.28.16
- sturmseq, 5.28.17
- subexpression, 4.3.2
- subexpressions, 4.3.2, 4.3.3
- subMat, 5.45.16
- subs, 5.12.17
- subsop, 5.40.10, 5.45.13
- subst, 5.12.16
- subtype, 10.2.5
- sum, 5.18.2, 5.40.29, 5.45.4
- sum_riemann, 5.18.3
- supposons, 4.6.8
- suppress, 5.40.5
- svd, 5.52.6
- switch, 10.3.2
- switch_axes, 11.2.2
- sylvester, 5.28.18
- symb2poly, 5.27.2
- symbol, 10.1.3
- symmetry, 12.14.3
- syst2mat, 5.56.1
- TRUE, 5.2.1
- table, 5.43
- tablefunc, 5.13.1, 5.17.4
- tableseq, 5.13.2
- tail, 5.4.2, 5.40.6
- tan, 5.16.2, 5.22.1
- tan, 5.22.24
- tan2cossin2, 5.22.16
- tan2sincos, 5.22.14
- tan2sincos2, 5.22.15
- tangent, 6.5.5, 11.7.7, 12.6.3
- tanh, 5.16.2
- taylor, 5.36.2
- tCollect, 5.22.4
- tchebyshev1, 5.29.4
- tchebyshev2, 5.29.5
- tcoeff, 5.27.7
- tcollect, 5.22.4
- tExpand, 5.21.1
- tetrahedron, 12.16.2
- texpand, 5.21.1
- textinput, 10.2.2
- then, 10.3.1
- thiele, 5.27.29
- threshold, 5.25.6
- throw, 10.4.9
- tlin, 5.22.3
- tpsolve, 5.47.3
- trace, 5.46.3
- tran, 5.46.1
- translation, 11.15.2, 12.14.2
- transpose, 5.46.1
- trapeze, 6.7
- triangle, 11.8.1, 12.7.1
- triangle_paper, 11.2.7
- triangle_window, 5.25.19
- trig, 5.21.2
- trig2exp, 5.22.20
- trigcos, 5.22.22
- trigexpand, 5.22.2
- trigsimplify, 5.22.6
- trigsin, 5.22.21
- trigtan, 5.22.23
- trn, 5.46.7
- true, 5.2.1
- trunc, 5.16.2
- truncate, 5.27.21
- try, 10.4.9
- tsimplify, 5.26.9
- tukey_window, 5.25.20
- type, 10.2.5
- Unquoted, 10.4.3
- UTPC, 7.4.7
- UTPF, 7.4.8
- UTPN, 7.4.5
- UTPT, 7.4.6
- ufactor, 9.1.5
- unapply, 5.15.2
- unarchive, 4.6.6, 4.6.6
- unfactored, 6.10
- uniform, 7.4.13
- uniform_cdf, 7.4.13
- uniform_icdf, 7.4.13
- uniformd, 7.4.13
- uniformd_cdf, 7.4.13
- uniformd_icdf, 7.4.13
- union, 5.39.2
- unitV, 5.11.7, 5.41.2
- unquote, 5.12.4
- until, 10.3.4
- user_operator, 5.14.3
- usimplify, 9.1.6
- VARS, 4.6.9, 4.8.3
- valuation, 5.27.5
- vandermonde, 5.44.7
- variable, 4.6.1
- variance, 5.42, 5.45.31, 7.1.2
- vector, 11.7.4, 12.5.4
- vectors, 5.40
- vertices, 11.6.12, 12.16.6
- vertices_abc, 11.6.12
- vertices_abca, 11.6.13
- vpotential, 5.54.7
- WAIT, 10.4.8
- watch, 10.5.1
- weibull, 7.4.15
- weibull_cdf, 7.4.15
- weibull_icdf, 7.4.15
- weibulld, 7.4.15
- weibulld_cdf, 7.4.15
- weibulld_icdf, 7.4.15
- welch_window, 5.25.21
- when, 4.7.2
- while, 10.3.5
- white, 6.1.1
- wilcoxonp, 7.4.18
- wilcoxons, 7.4.18
- write, 10.4.2
- writergb, 13.2.4
- writewav, 5.24.3, 13.1.2
- xor, 5.2.3
- xstep, 6.2
- yellow, 6.1.1
- ystep, 6.2
- zeros, 5.12.11
- zeta, 5.9.10
- zip, 5.40.33
- zstep, 6.2

# Chapter 2 Introduction

## 2.1 Notations used in this manual

In this manual, the information that you enter will be typeset in typewriter font. User input typically takes one of three forms:

- Commands that you enter on the command line.
  For example, to compute the sin of π/4, you can type
  sin(pi/4)
- Commands requiring a prefix key.
  These will be indicated by separating the prefix key and the standard key with a plus +. For example, to exit an Xcas session, you can type the control key along with the q key, which will be denoted
  Ctrl+Q
- Menu commands.
  When denoting menu items, submenus will be connected using ▸. For example, from within Xcas you can choose the File menu, then choose the Open submenu, and then choose the File item. This will be indicated by
  File ▸ Open ▸ File

The index will use different typefaces for different parts of the language. The commands themselves will be written with normal characters, command options will be written in italics and values of commands or options will be written in typewriter font. For example (as you will see later), you can draw a blue parabola with the command

plotfunc(x^2,color = blue)

In the index, you will see

- plotfunc, the command, written in normal text.
- color, the command option, written in italics.
- blue, the value given to the option, written in typewriter font.

## 2.2 Interfaces for the giac library

The giac library is a C++ mathematics library. It comes with two interfaces for users to use it directly; a graphical interface and a command-line interface.

The graphical interface is called Xcas, and is the most full-featured interface. As well being able to do symbolic and numeric calculations, it has its own programming language, it can draw graphs, it has a built-in spreadsheet, it can do dynamic geometry and turtle graphics.

The command-line interface can be run inside a terminal. It can also do symbolic and numeric calculations and works with the programming language. In a graphical environment, the command-line interface can also be used to draw graphs.

There is also a web version, which can be run through a browser, either over the internet or from local files. Other programs (for example, TeXmacs) have interfaces for the command-line version.

- The Xcas interface
- The command-line interface
- The Firefox interface
- The TeXmacs interface

# Chapter 3 The Xcas interface

## 3.1 The entry levels

The Xcas interface can run several independent calculation sessions, each session will be contained in a separate tab. Before you understand the Xcas interface, it would help to be familiar with the components of a session.

Each session can have any number of input levels. Each input level will have a number to the left of it; the number is used to identify the input level. Each level can have one of the following:

- A command line.
  This is the default; you can open a new command line with Alt+N.
  You can enter a giac command (or a series of commands separated by semicolons) on a command line and send it to be evaluated by hitting enter. You can also scroll through the command history with Shift+Up and Shift+Down.

  If the output is a number or an expression, then it will appear in blue text in a small area below the input region; this area is an expression editor. There will be a scrollbar and a small M to the right of this area; the M is a menu which gives you various options.

  If the output is a graphic, then it will appear in a graphing area below the input region. To the right of the graphic will be a control panel allowing you to manipulate the graphic.

- An expression editor.
  You can open an expression editor with Alt+E.
- A two-dimensional geometry screen.
  You can open up such a screen with Alt+G. This level will have a screen, as well as a control panel, menus and a command line to control the screen.
- A three-dimensional geometry screen.
  You can open up such a screen with Alt+H. This level will have a screen, as well as a control panel, menus and a command line to control the screen.
- A turtle graphics screen.
  You can open up such a screen with Alt+D. This level will have a screen, as well as a program editor and command line.
- A spreadsheet.
  You can open up a spreadsheet with Alt+T. A spreadsheet will be able to open a graphic screen.
- A program editor.
  You can open up a program editor with Alt+P.
- A comment line. You can open up a comment line with Alt+C.

Using commands discussed later, different types of levels can be combined to form a single hybrid level. Levels can also be moved up or down in a session, or even moved to a different session.

The level containing the cursor is the current level. The current level can be evaluated or re-evaluated by typing enter.

A level can be selected (for later operations) by clicking on the number in the white box to the left of the level. Once selected, the box containing the number will turn black. You can select a range of levels by clicking on the number for the beginning level, and then holding the shift key while you click on the number for the ending level.

## 3.2 The starting window

When you first start Xcas, you will be given a largely blank window.

The first row will be the main menus; you can save and load Xcas sessions, configure Xcas and its interface and run various commands with entries from these menus.

The second row will be tabs; one tab for each session that you are running in Xcas. The tabs will contain the name of the sessions, or Unnamed if a session has no name. The first time you start Xcas, there will be only one unnamed session.

The third row will contain various buttons.

- The first button, ?, will open the help index. (The same as the Help▸Index menu entry.) If there is a command on the command line, the help index (see help index ) will open at this command.
- The second button Save, will save the session in a file. The first time you click on it, you will be prompted for a file name ending in .xws to save the session in. The button will be pink if the session is not saved or if it has changed since the last change, it will be green once the session is saved. The name in the title will be the name of the file used to save the session.
- The third button, which in the picture above is
  Config : exact real RAD 12 xcas 6.2148M, is a status line indicating the current Xcas configuration. (See section 3.5.) If the session is unsaved, it will begin with Config :; if the session is saved in a file filename.xws, this button will begin with Config filename.xws :. Other information on this status line:
  - exact or approx. (See subsection 3.5.4.) This tells you whether Xcas will give you exact values, such as √2, when possible or to give you decimal approximations.
  - real, cplx or CPLX. (See subsections 3.5.5 and 3.5.6.) When this shows real, then (for example) Xcas will by default only find real solutions of equations. When this shows cplx, the Xcas will find complex solutions of equations. When this shows CPLX, then Xcas will regard variables as complex; for example, it won’t simplify re(z) (the real part of the variable z) to z.
  - RAD or DEG. (See subsection 3.5.3.) This tells you whether angles, as in trigonometric arguments, are measured in radians or degrees.
  - An integer. (See subsection 3.5.1, indicating how many significant digits will be used in floating point calculations.
  - xcas, maple, mupad or ti89. (See subsection 3.5.2.) This tells you what syntax Xcas will use. Xcas can be set to emulate the languages of Maple, MuPAD or the TI89 series of calculators.
  - The last item indicates how much memory Xcas is using.
  Clicking on this status line button will open a window where you can configure the settings shown on this line as well as some other settings; you can do the same with the menu item Cfg▸CAS Configuration. (See subsection 3.5.7.)
- The fourth button, STOP (in red), can be used to halt a computation which is running on too long.
- The fifth button, Kbd, can be used to toggle an on-screen scientific keyboard at the bottom of the window.
  Along the right hand side of the keyboard are some keys that can be used to change the keyboard.
  - The X key will hide the keyboard, just like pressing the Kbd button again.
  - The cmds key will toggle a menu bar at the bottom of the screen which can be used as an alternate menu or persistent submenu. This bar will contain buttons, home, <<, some menu titles, >>, var, cust and X.

    The << and >> buttons will scroll through menu items. Clicking on one of the menu buttons will perform the appropriate action or replace the menu items by submenu items. When submenu items appear, there will also be a BACK button to return to the previous menu. Clicking on the home button returns the menu buttons to the main menu.

    After the menu buttons is a var button. This will replace the menu buttons by buttons representing the variables that you have defined. After that is a cust button, which will display commands that you store in a list variable CST.

    The last button, X, will close the menu bar.

  - The msg key will bring up a message window at the bottom of the window which will give you helpful messages; for example, if you save a graphic, it will tell you the name of the file it is saved in and how to include it in a LATEX file.
  - The abc key will toggle the keyboard between the scientific keyboard and an alphabetic keyboard.
- The fifth button, X, will close the current session.

## 3.3 Getting help

Xcas is an extensive program, but you can get help in several different ways.

- - Tooltips
  - HTML help
  - The help index
  - findhelp

## 3.4 The menus

- The File menu
- The Edit menu
- The Cfg menu
- The Help menu
- The Toolbox menu
- The Expression menu
- The Cmds menu
- The Prg menu
- The Graphic menu
- The Geo menu
- The Spreadsheet menu
- The Phys menu
- The Highschool menu
- The Turtle menu

## 3.5 Configuring Xcas

- The number of significant digits
- The language mode
- The units for angles
- Exact or approximate values
- Complex numbers
- Complex variables
- Configuring the computations
- Configuring the graphics
- More configuration
- The configuration file

## 3.6 Printing and saving

- Saving a session
- Saving a spreadsheet
- Saving a program
- Printing a session

## 3.7 Translating to other computer languages

Xcas can translate a session, or parts of a session, to other computer languages; notably LATEX and MathML.

- Translating an expression to LATEX
- Translating the entire session to LATEX
- Translating graphical output to LATEX
- Translating an expression to MathML
- Translating a spreadsheet to MathMML
- Translating a Maple file to Xcas

# Chapter 4 Entry in Xcas

## 4.1 Suppressing output

If you enter a command into Xcas, the result will appear in the output box below the input. If you enter

a := 2+2

then

4

will appear in the output box. You can evaluate the input and suppress the output with the nodisp command. If you enter

nodisp(a := 2+2)

then a will still be set to 4, but the result will not appear in the output box. Instead,

Done

will appear.

An alternate way of suppressing the output is to end the input with :;, if you enter

b := 3+3:;

then b will be set to 6 but it won’t be displayed.

## 4.2 Entering comments

You can annotate an Xcas session by adding comments. You can enter a comment on the current line at any time by typing Alt+C. The line will appear in green text and conclude when you type Enter. Comments are not evaluated and so have no output. If you have begun entering a command when you begin a comment, the command line be pushed down so that you can finish it when you complete the comment.

You can open the browser in a comment line by entering the web address beginning with the @ sign. If you enter the comment line

The Xcas homepage is at
@www-fourier.ujf-grenoble.fr/~parisse/giac.html

then the browser will open to the Xcas home page.

To add a comment to a program, rather than a session, you can use the comment command, which takes a string as an argument. Alternatively, any part of a program between // and the end of the line is a comment. So both

bs() := {comment("Hello"); return "Hi there!";}

and

bs() := { // Hello
return "Hi there!";}

are programs with the comment "Hello".

## 4.3 Editing expressions

You can enter expressions on the command line, but Xcas also has a built-in expression editor that you can use to enter expressions in two dimensions, the way they normally look when typeset. When you have an expression in the editor, you can also manipulate subexpressions apart from the entire expression.

- Entering expressions in the editor
- Subexpressions
- Manipulating subexpressions

## 4.4 Previous results

The ans command will return the results of previous commands. The input to ans is the number of the command, beginning with 0. If the first command that you enter is

2+5

resulting in

7

then later references to ans(0) will evaluate to 7.

Note that the argument to ans doesn’t correspond to the line number in Xcas. For one thing, the line numbers begin at 1. What’s more, if you go back and re-evaluate a previous line, then that will become part of the commands that ans keeps track of.

If you give ans a negative number, then it counts backwards from the current input. To get the latest output, for example, you can use ans(-1). With no argument, ans() wil also return the latest output.

Similarly, quest will return the previous inputs. Since these will often be simplified to be the same as the output, quest(n) sometimes has the same value as ans(n).

You can also use Ctrl plus the arrow keys to scroll through previous inputs. With the cursor on the command line, Ctrl+uparrow will go backwards in the list of previous commands and Ctrl+downarrow will go forwards.

## 4.5 Spreadsheet

- Opening a spreadsheet
- The spreadsheet window

## 4.6 Variables

- Variable names
- Assigning values
- Assignment by reference
- Copying values of list
- Incrementing variables
- Storing and recalling variables and their values
- Copying variables
- Assumptions on variables
- Unassigning variables

## 4.7 Functions

- Defining functions
- Defining piecewise defined functions

## 4.8 Directories

- Working directories
- Reading files
- Internal directories

# Chapter 5 The CAS functions

## 5.1 Symbolic constants : e pi infinity i

e is the number exp(1);
pi is the number π.
infinity is unsigned ∞.
+infinity is +∞.
-infinity is −∞.
i is the complex number i.

## 5.2 Booleans

- The values of a boolean : true false
- Tests : ==, !=, >, >=, <, =<
- Boolean operators : or xor and not
- Transform a boolean expression to a list : exp2list
- Evaluate booleans : evalb

## 5.3 Bitwise operators

- Operators bitor, bitxor, bitand
- Bitwise Hamming distance : hamdist

## 5.4 Strings

- Character and string : "
- First character, middle and end of a string : head mid tail
- Concatenation of a sequence of words : cumSum
- ASCII code of a character : ord
- ASCII code of a string : asc
- String defined by the ASCII codes of its characters : char
- Find a character in a string : inString
- Concat objects into a string : cat
- Add an object to a string : +
- Transform an integer into a string : cat +
- Transform a string into a number : expr

## 5.5 Write an integer in base b: convert

convert or convertir can do different kind of conversions depending on the option given as the second argument.

To convert an integer n into the list of its coefficients in base b, the option is base. The arguments of convert or convertir are an integer n, base and b, the value of the basis.
convert or convertir returns the list of coefficients in a b basis of the integer n.
Input :

convert(123,base,8)

Output :

[3,7,1]

To check the answer, input expr("0173") or horner(revlist([3,7,1]),8) or convert([3,7,1],base,8), the output is 123
Input :

convert(142,base,12)

Output :

[10,11]

To convert the list of coefficients of an integer n in base b, the option is also base. convert or convertir returns the integer n.
Input :

convert([3,7,1],base,8)

or :

horner(revlist([3,7,1]),8)

Output :

123

Input :

convert([10,11],base,12)

or :

horner(revlist([10,11]),12)

Output :

142

## 5.6 Integers (and Gaussian Integers)

For all functions in this section, you can use Gaussian integers (numbers of the form a+ib, where a and b are in ℤ) in place of integers.

- The factorial : factorial
- GCD : gcd igcd
- GCD : Gcd
- GCD of a list of integers : lgcd
- The least common multiple : lcm
- Decomposition into prime factors : ifactor
- List of prime factors : ifactors
- Matrix of factors : maple_ifactors
- The divisors of a number : idivis divisors
- The integer Euclidean quotient : iquo intDiv
- The integer Euclidean remainder : irem remain smod mods mod %
- Euclidean quotient and euclidean remainder of two integers : iquorem
- Test of evenness : even
- Test of oddness : odd
- Test of pseudo-primality : is_pseudoprime
- Test of primality : is_prime isprime isPrime
- The smallest pseudo-prime greater than n : nextprime
- The greatest pseudo-prime less than n : prevprime
- The n-th prime number : ithprime
- Bézout’s Identity : iegcd igcdex
- Solving au+bv=c in ℤ: iabcuv
- Chinese remainders : ichinrem, ichrem
- Chinese remainders for lists of integers : chrem
- Solving a2+b2=p in ℤ : pa2b2
- The Euler indicatrix : euler phi
- Legendre symbol : legendre_symbol
- Jacobi symbol : jacobi_symbol
- Listing all compositions of an integer into k parts : icomp

## 5.7 Combinatorial analysis

- Factorial : factorial !
- Binomial coefficients : binomial comb nCr
- Permutations : perm nPr
- Random integers : rand

## 5.8 Rationals

- Transform a floating point number into a rational : exact float2rational
- Integer and fractional part : propfrac propFrac
- Numerator of a fraction after simplification : numer getNum
- Denominator of a fraction after simplification : denom getDenom
- Numerator and denominator of a fraction : f2nd fxnd
- Simplification of a pair of integers : simp2
- Continued fraction representation of a real : dfc
- Transform a continued fraction representation into a real : dfc2f
- The n-th Bernoulli number : bernoulli
- Access to PARI/GP commands: pari

## 5.9 Real numbers

- Eval a real at a given precision : evalf and Digits, DIGITS
- Usual infixed functions on reals : +,-,*,/,^
- Usual prefixed functions on reals : rdiv
- n-th root : root
- Error function : erf
- Complementary error function: erfc
- The Γ function : Gamma
- The β function : Beta
- Derivatives of the DiGamma function : Psi
- The ζ function : Zeta
- Airy functions : Airy_Ai and Airy_Bi

## 5.10 Permutations

A permutation p of size n is a bijection from [0..n−1] on [0..n−1] and is represented by the list : [p(0),p(1),p(2)...p(n−1)].
For example, the permutation p represented by [1,3,2,0] is the application from [0,1,2,3] on [0,1,2,3] defined by :

p(0)=1, p(1)=3, p(2)=2, p(3)=0

A cycle c of size p is represented by the list [a0,...,ap−1] (0≤ ak≤ n−1) it is the permutation such that

c(ai)=ai+1 for (i=0..p−2), c(ap−1)=a0, c(k)=k otherwise

A cycle c is represented by a list and a cycle decomposition is represented by a list of lists.
For example, the cycle c represented by the list [3,2,1] is the permutation c defined by c(3)=2, c(2)=1, c(1)=3, c(0)=0 (i.e. the permutation represented by the list [0,3,1,2]).

- Random permutation : randperm
- Decomposition as a product of disjoint cycles : permu2cycles
- Product of disjoint cycles to permutation: cycles2permu
- Transform a cycle into permutation : cycle2perm
- Transform a permutation into a matrix : permu2mat
- Checking for a permutation : is_permu
- Checking for a cycle : is_cycle
- Product of two permutations : p1op2
- Composition of a cycle and a permutation : c1op2
- Composition of a permutation and a cycle : p1oc2
- Product of two cycles : c1oc2
- Signature of a permutation : signature
- Inverse of a permutation : perminv
- Inverse of a cycle : cycleinv
- Order of a permutation : permuorder
- Group generated by two permutations : groupermu

## 5.11 Complex numbers

Note that complex numbers are also used to represent a point in the plane or a 1-d function graph.

- Usual complex functions : +,-,*,/,^
- Real part of a complex number : re real
- Imaginary part of a complex number : im imag
- Write a complex as re(z)+i*im(z) : evalc
- Modulus of a complex number : abs
- Argument of a complex number : arg
- The normalized complex number : normalize unitV
- Conjugate of a complex number : conj
- Multiplication by the complex conjugate : mult_c_conjugate
- Barycenter of complex numbers : barycentre

## 5.12 Algebraic expressions

- Evaluate an expression : eval
- Evaluate algebraic expressions : evala
- Prevent evaluation : quote hold ’
- Force evaluation : unquote
- Distribution : expand fdistrib
- Canonical form : canonical_form
- Multiplication by the conjugate quantity : mult_conjugate
- Separation of variables : split
- Factorization : factor
- Complex factorization : cFactor
- Zeros of an expression : zeros
- Complex zeros of an expression : cZeros
- Normal form : normal
- Simplify : simplify
- Normal form for rational fractions : ratnormal
- Substitute a variable by a value : subst
- Substitute a variable by a value (Maple and Mupad compatibility) : subs
- Evaluate a primitive at boundaries: preval
- Sub-expression of an expression : part

## 5.13 Values of un

- Array of values of a sequence : tablefunc
- Table of values and graph of a recurrent sequence : tableseq and plotseq

## 5.14 Operators or infixed functions

An operator is an infixed function.

- Usual operators :+, -, *, /, ^
- Xcas operators
- Define an operator: user_operator

## 5.15 Functions and expressions with symbolic variables

- The difference between a function and an expression
- Transform an expression into a function : unapply
- Top and leaves of an expression : sommet feuille op

## 5.16 Functions

- Context-dependent functions.
  - Operators + and -
  - Operator *
  - Operator /
- Usual functions
- Defining algebraic functions
  - Defining a function from ℝp to ℝ
  - Defining a function from ℝp to ℝq
  - Defining families of function from ℝp−1 to ℝq using a function from ℝp to ℝq
- Composition of two functions: @
- Repeated function composition: @@
- Define a function with the history : as_function_of

## 5.17 Derivation and applications.

- Functional derivative : function_diff
- Length of an arc : arcLen
- Maximum and minimum of an expression: fMax fMin
- Table of values and graph : tablefunc and plotfunc
- Derivative and partial derivative
  - Derivative and first order partial derivative : diff derive deriver
  - Derivative and n-th order partial derivative : diff derive deriver

## 5.18 Integration

- Antiderivative and definite integral : integrate int Int
- Discrete summation: sum
- Riemann sum : sum_riemann
- Integration by parts : ibpdv and ibpu
  - ibpdv
  - ibpu
- Change of variables : subst

## 5.19 Calculus of variations

- Determining whether a function is convex : convex
- Euler-Lagrange equation(s) : euler_lagrange
- Jacobi equation : jacobi_equation
- Finding conjugate points : conjugate_equation
- An example : finding the surface of revolution with minimal area

## 5.20 Limits

- Limits : limit
- Integral and limit

## 5.21 Rewriting transcendental and trigonometric expressions

- Expand a transcendental and trigonometric expression : texpand tExpand
- Combine terms of the same type : combine

## 5.22 Trigonometry

- Trigonometric functions
- Expand a trigonometric expression : trigexpand
- Linearize a trigonometric expression : tlin
- Put together sine and cosine of the same angle : tcollect tCollect
- Simplify : simplify
- Simplify trigonometric expressions : trigsimplify
- Transform arccos into arcsin : acos2asin
- Transform arccos into arctan : acos2atan
- Transform arcsin into arccos : asin2acos
- Transform arcsin into arctan : asin2atan
- Transform arctan into arcsin : atan2asin
- Transform arctan into arccos : atan2acos
- Transform complex exponentials into sin and cos : sincos exp2trig
- Transform tan(x) into sin(x)/cos(x) : tan2sincos
- Rewrite tan(x) with sin(2x) and cos(2x) : tan2sincos2
- Rewrite tan(x) with cos(2x) and sin(2x) : tan2cossin2
- Rewrite sin, cos, tan in terms of tan(x/2) : halftan
- Rewrite trigonometric functions as function of tan(x/2) and hyperbolic functions as function of exp(x): halftan_hyp2exp
- Transform inverse trigonometric functions into logarithms : atrig2ln
- Transform trigonometric functions into complex exponentials : trig2exp
- Simplify and express preferentially with sine : trigsin
- Simplify and express preferentially with cosine : trigcos
- Simplify and express preferentially with tangents : trigtan
- Rewrite an expression with different options : convert convertir

## 5.23 Fourier transformation

- Fourier coefficients : fourier_an and fourier_bn or fourier_cn
  - fourier_an
  - fourier_bn
  - fourier_cn
- Discrete Fourier Transform
  - The properties of the Discrete Fourier Transform
  - Applications
- Fast Fourier Transform : fft
- Inverse Fast Fourier Transform : ifft
- An exercise with fft

## 5.24 Audio Tools

- Creating audio clips : createwav
- Reading WAV files from disk : readwav
- Writing WAV files to disk : writewav
- Audio playback : playsnd
- Averaging channel data : stereo2mono
- Audio clip properties : channels, bit_depth, samplerate, duration
- Extracting samples from audio clips : channel_data
- Changing the sampling rate : resample
- Visualizing waveforms : plotwav
- Visualizing power spectra : plotspectrum

## 5.25 Signal Processing

- Cross-correlation of two signals : cross_correlation
- Auto-correlation of a signal : auto_correlation
- Convolution of two signals : convolution
- Low-pass filtering : lowpass
- High-pass filtering : highpass
- Perform thresholding operations on an array : threshold
- Bartlett-Hann window function : bartlett_hann_window
- Blackman-Harris window function : blackman_harris_window
- Blackman window function : blackman_window
- Bohman window function : bohman_window
- Cosine window function : cosine_window
- Gaussian window function : gaussian_window
- Hamming window function : hamming_window
- Hann-Poisson window function : hann_poisson_window
- Hann window function : hann_window
- Parzen window function : parzen_window
- Poisson window function : poisson_window
- Riemann window function : riemann_window
- Triangular window function : triangle_window
- Tukey window function : tukey_window
- Welch window function : welch_window
- An example : static noise removal by spectral subtraction

## 5.26 Exponentials and Logarithms

- Rewrite hyperbolic functions as exponentials : hyp2exp
- Expand exponentials : expexpand
- Expand logarithms : lnexpand
- Linearize exponentials : lin
- Collect logarithms : lncollect
- Expand powers : powexpand
- Rewrite a power as an exponential : pow2exp
- Rewrite exp(n*ln(x)) as a power : exp2pow
- Simplify complex exponentials : tsimplify

## 5.27 Polynomials

A polynomial of one variable is represented either by a symbolic expression or by the list of its coefficients in decreasing powers order (dense representation). In the latter case, to avoid confusion with other kinds of list

- use `poly1[...]` as delimiters in inputs
- check for in Xcas output.

Note that polynomials represented as lists of coefficients are always written in decreasing powers order even if increasing power is checked in cas configuration.

A polynomial of several variables is represented

- by a symbolic expression
- or by a dense recursive 1-d representation like above
- or by a sum of monomials with non-zero coefficients (distributed sparse representation).
  A monomial with several variables is represented by a coefficient and a list of integers (interpreted as powers of a variable list). The delimiters for monomials are %%%{ and %%%}, for example 3x2y is represented by %%%{3,[2,1]%%%} with respect to the variable list [x,y]).

- Convert to a symbolic polynomial : r2e poly2symb
- Convert from a symbolic polynomial : e2r symb2poly
- Coefficients of a polynomial: coeff coeffs
- Polynomial degree : degree
- Polynomial valuation : valuation ldegree
- Leading coefficient of a polynomial : lcoeff
- Trailing coefficient degree of a polynomial : tcoeff
- Evaluation of a polynomial : peval polyEval
- Factorize xn in a polynomial : factor_xn
- GCD of the coefficients of a polynomial : content
- Primitive part of a polynomial : primpart
- Factorization : collect
- Factorization : factor factoriser
- Square-free factorization : sqrfree
- List of factors : factors
- Evaluate a polynomial : horner
- Rewrite in terms of the powers of (x-a) : ptayl
- Compute with the exact root of a polynomial : rootof
- Exact roots of a polynomial : roots
- Coefficients of a polynomial defined by its roots : pcoeff pcoef
- Truncate of order n : truncate
- Convert a series expansion into a polynomial : convert convertir
- Random polynomial : randpoly randPoly
- Change the order of variables : reorder
- Random list : ranm
- Lagrange’s polynomial : lagrange interp
- Trigonometric interpolation : triginterp
- Natural splines: spline
  - Definition
  - Theorem
  - Interpolation with spline functions
- Rational interpolation : thiele
  - Examples

## 5.28 Arithmetic and polynomials

Polynomials are represented by expressions or by list of coefficients by decreasing power order. In the first case, for instructions requiring a main variable (like extended gcd computations), the variable used by default is x if not specified. For modular coefficients in ℤ/nℤ, use % n for each coefficient of the list or apply it to the expression defining the polynomial.

- The divisors of a polynomial : divis
- Euclidean quotient : quo
- Euclidean quotient : Quo
- Euclidean remainder : rem
- Euclidean remainder: Rem
- Quotient and remainder : quorem divide
- GCD of two polynomials with the Euclidean algorithm: gcd
- GCD of two polynomials with the Euclidean algorithm : Gcd
- Choosing the GCD algorithm of two polynomials : ezgcd heugcd modgcd psrgcd
- LCM of two polynomials : lcm
- Bézout’s Identity : egcd gcdex
- Solving au+bv=c over polynomials: abcuv
- Chinese remainders : chinrem
- Cyclotomic polynomial : cyclotomic
- Sturm sequences and number of sign changes of P on (a, b] : sturm
- Number of zeros in [a,b) : sturmab
- Sturm sequences : sturmseq
- Sylvester matrix of two polynomials : sylvester
- Resultant of two polynomials : resultant

## 5.29 Orthogonal polynomials

- Legendre polynomials: legendre
- Hermite polynomial : hermite
- Laguerre polynomials: laguerre
- Tchebychev polynomials of the first kind: tchebyshev1
- Tchebychev polynomial of the second kind: tchebyshev2

## 5.30 Gröbner basis and Gröbner reduction

- Gröbner basis : gbasis
- Gröbner reduction : greduce
- Build a polynomial from its evaluation : genpoly

## 5.31 Rational fractions

- Numerator : getNum
- Numerator after simplification : numer
- Denominator : getDenom
- Denominator after simplification : denom
- Numerator and denominator : f2nd fxnd
- Simplify : simp2
- Common denominator : comDenom
- Integer and fractional part : propfrac
- Partial fraction expansion : partfrac

## 5.32 Exact roots of a polynomial

- Exact bounds for complex roots of a polynomial : complexroot
- Exact bounds for real roots of a polynomial : realroot
- Exact values of rational roots of a polynomial : rationalroot
- Exact values of the complex rational roots of a polynomial : crationalroot

## 5.33 Exact roots and poles

- Roots and poles of a rational function : froot
- Rational function given by roots and poles : fcoeff

## 5.34 Computing in ℤ/pℤ or in ℤ/pℤ[x]

The way to compute over ℤ/pℤ or over ℤ/pℤ[x] depends on the syntax mode :

- In Xcas mode, an object n over ℤ/pℤ is written n % p. Some examples of input for
  - an integer n in ℤ/13ℤ
    n:=12%13.
  - a vector V in ℤ/13ℤ
    V:=[1,2,3]%13 or V:=[1%13,2%13,3%13].
  - a matrix A in ℤ/13ℤ
    A:=[[1,2,3],[2,3,4]]%13 or
    A:=[[1%13,2%13,3%13],[[2%13,3%13,4%13]].
  - a polynomial A in ℤ/13ℤ[x] in symbolic representation
    A:=(2*x`^`2+3*x-1)%13 or
    A:=2%13*x`^`2+3%13*x-1%13.
  - a polynomial A in ℤ/13ℤ[x] in list representation
    A:=poly1[1,2,3]%13 or A:=poly1[1%13,2%13,3%13].
  To recover an object o with integer coefficients instead of modular coefficients, input o % 0. For example, input o:=4%7 and o%0,then output is -3.
- In Maple mode, integers modulo p are represented like usual integers instead of using specific modular integers. To avoid confusion with normal commands, modular commands are written with a capital letter (inert form) and followed by the mod command (see also the next section).

Remark

- For some commands in ℤ/pℤ or in ℤ/pℤ[x], p must be a prime integer.
- The representation is the symmetric representation :
  11%13 returns -2%13.

- Expand and reduce : normal
- Addition in ℤ/pℤ or in ℤ/pℤ[x] : +
- Subtraction in ℤ/pℤ or in ℤ/pℤ[x] : -
- Multiplication in ℤ/pℤ or in ℤ/pℤ[x] : *
- Euclidean quotient : quo
- Euclidean remainder : rem
- Euclidean quotient and euclidean remainder : quorem
- Division in ℤ/pℤ or in ℤ/pℤ[x] : /
- Power in ℤ/pℤ and in ℤ/pℤ[x] : ^
- Compute an mod p : powmod powermod
- Inverse in ℤ/pℤ : inv inverse or /
- Rebuild a fraction from its value modulo p : fracmod
- GCD in ℤ/pℤ[x] : gcd
- Factorization over ℤ/pℤ[x] : factor factoriser
- Determinant of a matrix in ℤ/pℤ : det
- Inverse of a matrix with coefficients in ℤ/pℤ : inv inverse
- Row reduction to echelon form in ℤ/pℤ : rref
- Construction of a Galois field : GF
- Factorize a polynomial with coefficients in a Galois field : factor

## 5.35 Compute in ℤ/pℤ[x] using Maple syntax

- Euclidean quotient : Quo
- Euclidean remainder: Rem
- GCD in ℤ/pℤ[x] : Gcd
- Factorization in ℤ/pℤ[x] : Factor
- Determinant of a matrix with coefficients in ℤ/pℤ : Det
- Inverse of a matrix in ℤ/pℤ : Inverse
- Row reduction to echelon form in ℤ/pℤ : Rref

## 5.36 Taylor and asymptotic expansions

- Division by increasing power order : divpc
- Taylor expansion : taylor
- Series expansion : series
- The residue of an expression at a point : residue
- Padé expansion: pade

## 5.37 Intervals

- Definition of an interval : a1..a2
- Boundaries of an interval : left right
- Center of an interval : interval2center
- Intervals defined by their center : center2interval

## 5.38 Sequences

- Definition : seq[] ()
- Concat two sequences : ,
- Get an element of a sequence : []
- Sub-sequence of a sequence : []
- Make a sequence or a list : seq $
- Transform a sequence into a list : [] nop
- The + operator applied on sequences

## 5.39 Sets

- Definition : set[]
- Union of two sets or of two lists : union
- Intersection of two sets or of two lists : intersect
- Difference of two sets or of two lists : minus

## 5.40 Lists and vectors

- Definition
- Get an element or a sub-list of a list : at []
  - Get an element
  - Extract a sub-list
- Extract a sub-list : mid
- Get the first element of a list : head
- Remove an element in a list : suppress
- Remove the first element : tail
- Reverse order in a list : revlist
- Reverse a list starting from its n-th element : rotate
- Permuted list from its n-th element : shift
- Modify an element in a list : subsop
- Transform a list into a sequence : op makesuite
- Transform a sequence into a list : makevector []
- Length of a list : size nops length
- Sizes of a list of lists : sizes
- Concatenate two lists or a list and an element : concat augment
- Append an element at the end of a list : append
- Prepend an element at the beginning of a list : prepend
- Sort : sort
- Sort a list by increasing order : SortA
- Sort a list by decreasing order : SortD
- Select the elements of a list : select
- Remove elements of a list : remove
- Test if a value is in a list : member
- Test if a value is in a list : contains
- Sum of list (or matrix) elements transformed by a function : count
- Number of elements equal to a given value : count_eq
- Number of elements smaller than a given value : count_inf
- Number of elements greater than a given value : count_sup
- Sum of elements of a list : sum add
- Cumulated sum of the elements of a list : cumSum
- Product : product mul
  - Product of values of an expression : product
  - Product of elements of a list : product
- Apply a function of one variable to the elements of a list : map apply of
- Apply a bivariate function to the elements of two lists : zip
- Fold operators : foldl, foldr
- Make a list with zeros : newList
- Make a list with a function : makelist
- Make a random vector or list : randvector
- List of differences of consecutive terms : deltalist
- Make a matrix with a list : list2mat
- Make a list with a matrix : mat2list

## 5.41 Functions for vectors

- Norms of a vector : maxnorm l1norm l2norm norm
- Normalize a vector : normalize unitV
- Term by term sum of two lists : + .+
- Term by term difference of two lists : - .-
- Term by term product of two lists : .*
- Term by term quotient of two lists : ./
- Scalar product : scalar_product * dotprod dot dotP scalar_Product
- Cross product : cross crossP crossproduct

## 5.42 Statistics functions : mean,variance,stddev, stddevp,median,quantile,quartiles,boxwhisker

The functions described here may be used if the statistics series is contained in a list. See also section 5.45.31 for matrices.

- mean computes the arithmetic mean of a list
  Input :
  mean([3,4,2])
  Output :
  3
  Input :
  mean([1,0,1])
  Output
  2/3
- stddev computes the standard deviation of a population, if the argument is the population.
  Input :
  stddev([3,4,2])
  Output :
  sqrt(2/3)
- stddevp computes an unbiased estimate of the standard deviation of the population, if the argument is a sample. The following relation holds:
  stddevp(l)`^`2=size(l)*stddev(l)`^`2/(size(l)-1).
  Input :
  stddevp([3,4,2])
  Output :
  1
- variance computes the variance of a list, that is the square of stddevp
  Input :
  variance([3,4,2])
  Output :
  2/3
- median computes the median of a list.
  Input :
  median([0,1,3,4,2,5,6])
  Output :
  3.0
- quantile computes the deciles of a list given as first argument, where the decile is the second argument.
  Input :
  quantile([0,1,3,4,2,5,6],0.25)
  Output the first quartile :
  [1.0]
  Input :
  quantile([0,1,3,4,2,5,6],0.5)
  Output the median :
  [3.0]
  Input :
  quantile([0,1,3,4,2,5,6],0.75)
  Output the third quartile :
  [4.0]
- quartiles computes the minimum, the first quartile, the median, the third quartile and the maximum of a list.
  Input :
  quartiles([0,1,3,4,2,5,6])
  Output :
  [[0.0],[1.0],[3.0],[4.0],[6.0]]
- boxwhisker draws the whisker box of a statistics series stored in a list.
  Input :
  boxwhisker([0,1,3,4,2,5,6])
  Output
  the graph of the whisker box of this statistic list

Example
Define the list A by:

A:=[0,1,2,3,4,5,6,7,8,9,10,11]

Outputs :

1. 11/2 for mean(A)
2. sqrt(143/12) for stddev(A)
3. 0 for min(A)
4. [1.0] for quantile(A,0.1)
5. [2.0] for quantile(A,0.25)
6. [5.0] for median(A) or for quantile(A,0.5)
7. [8.0] for quantile(A,0.75)
8. [9.0] for quantile(A,0.9)
9. 11 for max(A)
10. [[0.0],[2.0],[5.0],[8.0],[11.0]] for quartiles(A)

## 5.43 Table with strings as indexes : table

A table is an associative container (or map), it is used to store information associated to indexes which are much more general than integers, like strings or sequences. It may be used for example to store a table of phone numbers indexed by names.
In Xcas, the indexes in a table may be any kind of Xcas objects. Access is done by a binary search algorithm, where the sorting function first sorts by type then uses an order for each type (e.g. < for numeric types, lexicographic order for strings, etc.)
table takes as argument a list or a sequence of equalities index_name=element_value.
table returns this table.
Input :

T:=table(3=-10,"a"=10,"b"=20,"c"=30,"d"=40)

Input :

T["b"]

Output :

20

Input :

T[3]

Output :

-10

Remark
If you assign T[n]:= ... where T is a variable name and n an integer

- if the variable name was assigned to a list or a sequence, then the n-th element of T is modified,
- if the variable name was not assigned, a table T is created with one entry (corresponding to the index n). Note that after the assignation T is not a list, despite the fact that n was an integer.

## 5.44 Usual matrix

A matrix is represented by a list of lists, all having the same size. In the Xcas answers, the matrix delimiters are [] (bold brackets). For example, [1,2,3] is the matrix [[1,2,3]] with only one row, unlike [1,2,3] (normal brackets) which is the list [1,2,3].
In this document, the input notation ([[1,2,3]]) will be used for input and output.

- Identity matrix : idn identity
- Zero matrix : newMat matrix
- Random matrix : ranm randMat randmatrix
- Diagonal of a matrix or matrix of a diagonal : BlockDiagonal diag
- Jordan block : JordanBlock
- Hilbert matrix : hilbert
- Vandermonde matrix : vandermonde

## 5.45 Arithmetic and matrix

- Evaluate a matrix : evalm
- Addition and subtraction of two matrices : + - .+ .-
- Multiplication of two matrices : * &*
- Addition of elements of a column of a matrix : sum
- Cumulated sum of elements of each column of a matrix : cumSum
- Multiplication of elements of each column of a matrix : product
- Power of a matrix : ^ &^
- Hadamard product : hadamard product
- Hadamard product (infixed version): .*
- Hadamard division (infixed version): ./
- Hadamard power (infixed version): .^
- Extracting element(s) of a matrix : [] at
- Modify an element or a row of a matrix : subsop
- Extract rows or columns of a matrix (Maple compatibility) : row col
- Remove rows or columns of a matrix : delrows delcols
- Extract a sub-matrix of a matrix (TI compatibility) : subMat
- Add a row to another row : rowAdd
- Multiply a row by an expression : mRow
- Add k times a row to an another row : mRowAdd
- Exchange two rows : rowSwap
- Make a matrix with a list of matrices : blockmatrix
- Make a matrix from two matrices : semi_augment
- Make a matrix from two matrices : augment concat
- Build a matrix with a function : makemat
- Define a matrix : matrix
- Append a column to a matrix : border
- Count the elements of a matrix verifying a property : count
- Count the elements equal to a given value : count_eq
- Count the elements smaller than a given value : count_inf
- Count the elements greater than a given value : count_sup
- Statistics functions acting on column matrices : mean, stddev, variance, median, quantile, quartiles, boxwhisker
- Dimension of a matrix : dim
- Number of rows : rowdim rowDim nrows
- Number of columns : coldim colDim ncols

## 5.46 Linear algebra

- Transpose of a matrix : tran transpose
- Inverse of a matrix : inv /
- Trace of a matrix : trace
- Determinant of a matrix : det
- Determinant of a sparse matrix : det_minor
- Rank of a matrix : rank
- Transconjugate of a matrix : trn
- Equivalent matrix : changebase
- Basis of a linear subspace : basis
- Basis of the intersection of two subspaces : ibasis
- Image of a linear function : image
- Kernel of a linear function : kernel nullspace ker
- Kernel of a linear function : Nullspace
- Subspace generated by the columns of a matrix : colspace
- Subspace generated by the rows of a matrix : rowspace

## 5.47 Linear Programmation

Linear programming problems are maximization problem of a linear functionals under linear equality or inequality constraints. The most simple case can be solved directly by the so-called simplex algorithm. Most cases require to solve an auxiliary linear programming problem to find an initial vertex for the simplex algorithm.

- Simplex algorithm: simplex_reduce
- Solving general linear programming problems: lpsolve
  - Solving LP problems
  - Entering problems in matrix form
  - Solving MIP (Mixed Integer Programming) problems
  - Solving problems in floating-point arithmetic
  - Loading problem from a file
- Solving transportation problems: tpsolve

## 5.48 Nonlinear optimization

- Global extrema: minimize maximize
  - Examples
- Local extrema: extrema
  - Examples
- Global extrema without using derivatives : nlpsolve
  - Examples
- Minimax polynomial approximation: minimax

## 5.49 Different matrix norm

- l2 matrix norm : norm l2norm
- l∞ matrix norm : maxnorm
- Matrix row norm : rownorm rowNorm
- Matrix column norm : colnorm colNorm

## 5.50 Matrix reduction

- Eigenvalues : eigenvals
- Eigenvalues : egvl eigenvalues eigVl
- Eigenvectors : egv eigenvectors eigenvects eigVc
- Rational Jordan matrix : rat_jordan
- Jordan normal form : jordan
- Characteristic polynomial : charpoly
- Characteristic polynomial using Hessenberg algorithm : pcar_hessenberg
- Minimal polynomial : pmin
- Adjoint matrix : adjoint_matrix
- Companion matrix of a polynomial : companion
- Hessenberg matrix reduction : hessenberg
- Hermite normal form : ihermite
- Smith normal form : ismith

## 5.51 Isometries

- Recognize an isometry : isom
- Find the matrix of an isometry : mkisom

## 5.52 Matrix factorizations

Note that most matrix factorization algorithms are implemented numerically, only a few of them will work symbolically.

- Cholesky decomposition : cholesky
- QR decomposition : qr
- QR decomposition (for TI compatibility) : QR
- LU decomposition : lu
- LU decomposition (for TI compatibility) : LU
- Singular value decomposition : svd
- Short basis of a lattice : lll

## 5.53 Quadratic forms

- Matrix of a quadratic form : q2a
- Transform a matrix into a quadratic form : a2q
- Reduction of a quadratic form : gauss
- Gram-Schmidt orthonormalization : gramschmidt
- Graph of a conic : conique
- Conic reduction : conique_reduite
- Graph of a quadric : quadrique
- Quadric reduction : quadrique_reduite

## 5.54 Multivariate calculus

- Gradient : derive deriver diff grad
- Laplacian : laplacian
- Hessian matrix : hessian
- Divergence : divergence
- Rotational : curl
- Potential : potential
- Conservative flux field : vpotential

## 5.55 Equations

- Define an equation : equal
- Transform an equation into a difference : equal2diff
- Transform an equation into a list : equal2list
- The left member of an equation : left gauche lhs
- The right member of an equation : right droit rhs
- Solving equation(s): solve
- Equation solving in ℂ : cSolve

## 5.56 Linear systems

In this paragraph, we call the "augmented matrix" of the system A · X=B (or matrix "representing" the system A · X=B), the matrix obtained by gluing the column vector B or −B to the right of the matrix A, as with border(A,tran(B)).

- Matrix of a system : syst2mat
- Gauss reduction of a matrix : ref
- Gauss-Jordan reduction: rref gaussjord
- Solving A*X=B : simult
- Step by step Gauss-Jordan reduction of a matrix : pivot
- Linear system solving: linsolve
- Finding linear recurrences : reverse_rsolve

## 5.57 Differential equations

This section is limited to symbolic (or exact) solutions of differential equations. For numeric solutions of differential equations, see odesolve. For graphic representation of solutions of differential equations, see plotfield, plotode and interactive_plotode.

- Solving differential equations : desolve deSolve dsolve
- Laplace transform and inverse Laplace transform : laplace ilaplace
- Solving linear homogeneous second-order ODE with rational coefficients : kovacicsols

## 5.58 Other functions

- Replace small values by 0: epsilon2zero
- List of variables : lname indets
- List of variables and of expressions : lvar
- List of variables of an algebraic expressions: algvar
- Test if a variable is in an expression : has
- Numeric evaluation : evalf
- Rational approximation : float2rational exact

# Chapter 6 Graphs

Most graph instructions take expressions as arguments. A few exceptions (mostly Maple-compatibility instructions) also accept functions. Some optional arguments, like color, thickness, can be used as optional attributes in all graphic instructions. They are described below.

## 6.1 Graph and geometric objects attributes

There are two kinds of attributes: global attributes of a graphic scene and individual attributes.

- Individual attributes
- Global attributes

## 6.2 Graph of a function : plotfunc funcplot DrawFunc Graph

- 2-d graph
- 3-d graph
- 3-d graph with rainbow colors
- 4-d graph.

## 6.3 2d graph for Maple compatibility : plot

plot(f(x),x) draws the graph of y=f(x). The second argument may specify the range of values x=xmin..xmax. One can also plot a function instead of an expression using the syntax plot(f,xmin..xmax). plot accepts an optional argument to specify the step used in x for the discretization with `xstep=` or the number of points of the discretization with `nstep=`.
Input :

plot(x`^`2-2,x)

Output :

the graph of y=x`^`2-2

Input :

plot(x`^`2-2,xstep=1)

or :

plot(x`^`2-2,x,xstep=1)

Output :

a polygonal line which is a bad representation of y=x`^`2-2

Input!

plot(x`^`2-2,x=-2..3,nstep=30)

## 6.4 3d surfaces for Maple compatibility plot3d

plot3d takes three arguments : a function of two variables or an expression of two variables or a list of three functions of two variables or a list of three expressions of two variables and the names of these two variables with an optional range (for expressions) or the ranges (for functions).
plot3d(f(x,y),x,y) (resp. plot3d([f(u,v),g(u,v),h(u,v)],u,v)) draws the surface z=f(x,y) (resp. x=f(u,v),y=g(u,v),z=h(u,v)). The syntax plot3d(f(x,y),x=x0..x1,y=y0..y1) or plot3d(f,x0..x1,y0..y1) specifies which part of surface will be computed (otherwise default values are taken from the graph configuration).
Input :

plot3d(x*y,x,y)

Output :

The surface z=x*y

Input :

plot3d([v*cos(u),v*sin(u),v],u,v)

Output :

The cone x=v*cos(u),y=v*sin(u),z=v

Input :

plot3d([v*cos(u),v*sin(u),v],u=0..pi,v=0..3)

Output :

A portion of the cone x=v*cos(u),y=v*sin(u),z=v

## 6.5 Graph of a line and tangent to a graph

- Draw a line : line
- Draw an 2D horizontal line : LineHorz
- Draw a 2D vertical line : LineVert
- Tangent to a 2D graph : LineTan
- Tangent to a 2D graph : tangent
- Intersection of a 2D graph with the axis

## 6.6 Graph of inequalities with 2 variables : plotinequation inequationplot

plotinequation([f1(x,y)<a1,...fk(x,y)<ak],[x=x1..x2,y=y1..y2]) draws the points of the plane whose coordinates satisfy the inequalities of 2 variables :

⎧
⎪
⎨
⎪
⎩

f1(x,y) | < | a1
| ... |
fk(x,y) | < | ak

, x1≤ x ≤ x2, y1 ≤ y ≤ y2

Input :

plotinequation(x`^`2-y`^`2<3, [x=-2..2,y=-2..2],xstep=0.1,ystep=0.1)

Output :

the filled portion enclosing the origin and limited by the hyperbola x`^`2-y`^`2=3

Input :

plotinequation([x+y>3,x`^`2<y], [x-2..2,y=-1..10],xstep=0.2,ystep=0.2)

Output :

the filled portion of the plane defined by -2<x<2,y<10,x+y>3,y>x`^`2

Note that if the ranges for x and y are not specified, Xcas takes the default values of X-,X+,Y-,Y+ defined in the general graphic configuration (Cfg▸Graphic configuration).

## 6.7 Graph of the area below a curve : plotarea areaplot

- With two arguments, plotarea shades the area below a curve.
  plotarea(f(x),x=a..b) draws the area below the curve y=f(x) for a<x<b, i.e. the portion of the plane defined by the inequalities a<x<b and 0<y<f(x) or 0>y>f(x) according to the sign of f(x) .
  Input :
  plotarea(sin(x),x=0..2*pi)
  Output :
  the portion of plane locates in the two arches of sin(x)
- With four arguments, plotarea represents a numeric approximation of the area below a curve, according to a quadrature method from the following list:
  trapezoid,rectangle_left,rectangle_right,middle_point.
  For example plotarea(f(x),x=a..b,n,trapezoid) draws the area of n trapezoids : the third argument is an integer n, and the fourth argument is the name of the numeric method of integration when [a,b] is cut into n equal parts.
  Input :
  plotarea((x`^`2,x=0..1,5,trapezoid)
  If you want to display the graph of the curve in contrast (e.g. in bold red), input :
  plotarea(x`^`2,x=0..1,5,trapezoid); plot(x`^`2,x=0..1,display=red+line_width_3)
  Output :
  the 5 trapezoids used in the trapezoid method to approach the integral
  Input :
  plotarea((x`^`2,x=0..1,5,middle_point)
  Or with the graph of the curve in bold red, input :
  plotarea(x`^`2,x=0..1,5,middle_point); plot(x`^`2,x=0..1,display=red+line_width_3)
  Output :
  the 5 rectangles used in the middle_point method to approach the integral

## 6.8 Contour lines: plotcontour contourplot DrwCtour

plotcontour(f(x,y),[x,y]) (or DrwCtour(f(x,y),[x,y]) or
contourplot(f(x,y),[x,y])) draws the contour lines of the surface defined by z=f(x,y) for z=−10, z=−8, .., z=0, z=2, .., z=10. You may specify the desired contour lines by a list of values of z given as third argument.
Input :

plotcontour(x`^`2+y`^`2,[x=-3..3,y=-3..3],[1,2,3], display=[green,red,black]+[filled$3])

Output :

the graph of the three ellipses x`^`2-y`^`2=n for n=1,2,3; the zones between these ellipses are filled with the color green,red or black

Input :

plotcontour(x`^`2-y`^`2,[x,y])

Output :

the graph of 11 hyperbolas x`^`2-y`^`2=n for n=-10,-8,..10

If you want to draw the surface in 3-d representation, input plotfunc(f(x,y),[x,y]), see 6.2.2):

plotfunc( x`^`2-y`^`2,[x,y])

Output :

A 3D representation of z=x`^`2+y`^`2

## 6.9 2-d graph of a 2-d function with colors : plotdensity densityplot

plotdensity(f(x,y),[x,y]) or densityplot(f(x,y),[x,y]) draws the graph of z=f(x,y) in the plane where the values of z are represented by the rainbow colors. The optional argument z=zmin..zmax specifies the range of z corresponding to the full rainbow, if it is not specified, it is deduced from the minimum and maximum value of f on the discretization. The discretization may be specified by optional xstep=... and ystep=... or nstep=... arguments.
Input :

plotdensity(x`^`2-y`^`2,[x=-2..2,y=-2..2], xstep=0.1,ystep=0.1)

Output :

A 2D graph where each hyperbola defined by x`^`2-y`^`2=z has a color from the rainbow

Remark : A rectangle representing the scale of colors is displayed below the graph.

## 6.10 Implicit graph: plotimplicit implicitplot

plotimplicit or implicitplot draws curves or surfaces defined by an implicit expression or equation. If the option unfactored is given as last argument, the original expression is taken unmodified. Otherwise, the expression is normalized, then replaced by the factorization of the numerator of its normalization.

Each factor of the expression corresponds to a component of the implicit curve or surface. For each factor, Xcas tests if it is of total degree less or equal to 2, in that case conic or quadric is called. Otherwise the numeric implicit solver is called.

Optional step and ranges arguments may be passed to the numeric implicit solver, note that they are dismissed for each component that is a conic or a quadric.

- 2D implicit curve
- 3D implicit surface
- Implicit differentiation : implicitdiff

## 6.11 Parametric curves and surfaces : plotparam paramplot DrawParm

- 2D parametric curve
- 3D parametric surface : plotparam paramplot DrawParm

## 6.12 Curve defined in polar coordinates : plotpolar polarplot DrawPol courbe_polaire

Let Et be an expression depending on the variable t.
plotpolar(Et,t) draws the polar representation of the curve defined by ρ=Et for θ=t, that is in cartesian coordinates the curve (Et cos(t),Et sin(t)). The range of the parameter may be specified by replacing the second argument by t=tmin..tmax. The discretization parameter may be specified by an optional tstep=... argument.
Input

plotpolar(t,t)

Output :

The spiral ρ=t is plotted

Input

plotpolar(t,t,tstep=1)

or :

plotpolar(t,t=0..10,tstep=1)

Output :

A polygon line approaching the spiral ρ=t is plotted

## 6.13 Graph of a recurrent sequence : plotseq seqplot graphe_suite

Let f(x) be an expression depending on the variable x (resp. f(t) an expression depending on the variable t).
plotseq(f(x),a,n) (resp. plotseq(f(t),t=a,n)) draws the line y=x, the graph of y=f(x) (resp. y=f(t)) and the n first terms of the recurrent sequence defined by : u0=a, un=f(un−1). The a value may be replaced by a list of 3 elements, [a,x−,x+] where x−..x+ will be passed as x range for the graph computation.
Input :

plotseq(sqrt(1+x),x=[3,0,5],5)

Output :

the graph of y=sqrt(1+x), of y=x and of the 5 first terms of the sequence u_0=3 and u_n=sqrt(1+u_(n-1))

## 6.14 Tangent field : plotfield fieldplot

- Let f(t,y) be an expression depending on two variables t and y, then :
  plotfield(f(t,y),[t,y])
  draws the tangent field of the differential equation y′=f(t,y) where y is a real variable and where t is the abscissa,
- Let V be a vector of two expressions depending on 2 variables x,y but independent of the time t, then
  plotfield(V,[x,y])
  draws the vector field V,
- The range of values of t,y or of x,y can be specified with
  t=tmin..tmax, x=xmin..xmax, y=ymin..ymax
  in place of the variable name.
- The discretization may be specified with optional arguments xstep=..., ystep=....

Input :

plotfield(4*sin(t*y),[t=0..2,y=-3..7])

Output :

Segments with slope 4*sin(t*y), representing tangents, are plotting in different points

With two variables x,y, input :

plotfield(5*[-y,x],[x=-1..1,y=-1..1])

## 6.15 Plotting a solution of a differential equation : plotode odeplot

Let f(t,y) be an expression depending on two variables t and y.

- plotode(f(t,y),[t,y],[t0,y0]) draws the solution of the differential equation y′=f(t,y) crossing through the point (t0,y0) (i.e. such that y(t0)=y0)
- By default, t goes in both directions. The range of value of t may be specified by the optional argument t=tmin..tmax.
- We can also represent, in the space or in the plane, the solution of a differential equation y′=f(t,y) where y=(X,Y) is a vector of size 2. Just replace y by the variable names X,Y and the initial value y0 by the two initial values of the variables at time t0.

Input :

plotode(sin(t*y),[t,y],[0,1])

Output :

The graph of the solution of y’=sin(t,y) crossing through the point (0,1)

Input :

S:=odeplot([h-0.3*h*p, 0.3*h*p-p], [t,h,p],[0,0.3,0.7])

Output, the graph in the space of the solution of :

[h,p]′=[h−0.3 h*p, 0.3 h*p−p] [h,p](0)=[0.3,0.7]

To have a 2-d graph (in the plane), use the option plane

S:=odeplot([h-0.3*h*p, 0.3*h*p-p], [t,h,p],[0,0.3,0.7],plane)

To compute the values of the solution, see the subsection 8.3.4.

## 6.16 Interactive plotting of solutions of a differential equation : interactive_plotode interactive_odeplot

Let f(t,y) be an expression depending on two variables t and y.
interactive_plotode(f(t,y),[t,y]) draws the tangent field of the differential equation y′=f(t,y) in a new window. In this window, one can click on a point to get the plot of the solution of y′=f(t,y) crossing through this point.
You can further click to display several solutions. To stop press the Esc key.
Input :

interactive_plotode(sin(t*y),[t,y])

Output :

The tangent field is plotted with the solutions of y’=sin(t,y) crossing through the points defined by mouse clicks

## 6.17 Animated graphs (2D, 3D or "4D")

Xcas can display animated 2D, 3D or "4D" graphs. This is done first by computing a sequence of graphic objects, then after completion, by displaying the sequence in a loop.

- To stop or start again the animation, click on the button ▸ ∣ (at the left of Menu).
- The display time of each graphic object is specified in animate of the graph configuration (cfg button). Put a small time, to have a fast animation.
- If animate is 0, the animation is frozen, you can move in the sequence of objects one by one by clicking on the mouse in the graphic scene.

- Animation of a 2D graph : animate
- Animation of a 3D graph : animate3d
- Animation of a sequence of graphic objects : animation

# Chapter 7 Statistics

## 7.1 One variable statistics

Xcas has several functions to perform statistics; the data is typically given as a list of numbers, such as A := [0,1,2,3,4,5,6,7,8,9,10,11]. We will use this particular list in several examples. Section 5.45.31 will discuss statistics on matrices.

- The mean: mean
- Variance and standard deviation: variance stdev
- The population standard deviation: stddevp stdDev
- The median: median
- Quartiles: quartiles quartile1 quartile3
- Quantiles: quantile
- The boxwhisker: boxwhisker mustache
- Classes: classes
- Histograms: histogram histogramme
- Accumulating terms: accumulate_head_tail
- Frequencies: frequencies frequences
- Cumulative frequencies: cumulated_frequencies frequences_cumulees
- Bar graphs: bar_plot
- Pie charts: camembert

## 7.2 Two variable statistics

- Covariance and correlation: covariance correlation covariance_correlation
- Scatterplots: scatterplot nuaged_points batons
- Polygonal paths: polygonplot ligne_polygonale linear_interpolate listplot plotlist
- Linear regression: linear_regression linear_regression_plot
- Exponential regression: exponential_regression exponential_regression_plot
- Logarithmic regression: logarithmic_regression logarithmic_regression_plot
- Power regression: power_regression power_regression_plot
- Polynomial regression: polynomial_regression polynomial_regression_plot
- Logistic regression: logistic_regression logistic_regression_plot

## 7.3 Random numbers

- Producing uniformly distributed random numbers: rand random alea hasard
- Initializing the random number generator: srand randseed RandSeed
- Producing random numbers with the binomial distribution: randbinomial
- Producing random numbers with a multinomial distribution: randmultinomial
- Producing random numbers with a Poisson distribution: randpoisson
- Producing random numbers with a normal distribution: randnorm randNorm
- Producing random numbers with an exponential distribution: randexp
- Producing random matrices: randmatrix ranm randMat
- Random variables : random_variable randvar

## 7.4 Density and distribution functions

- The binomial distribution
  - The probability density function for the binomial distribution : binomial
  - The cumulative distribution function for the binomial distribution: binomial_cdf
  - The inverse distribution function for the binomial distribution: binomial_icdf
- The negative binomial distribution
  - The probability density function for the negative binomial distribution: negbinomial
  - The cumulative distribution function for the negative binomial distribution: negbinomial_cdf
  - The inverse distribution function for the negative binomial distribution: negbinomial_icdf
- The multinomial probability function: multinomial
- The Poisson distribution
  - The probability density function for the Poisson distribution: poisson
  - The cumulative distribution function for the Poisson distribution: poisson_cdf
  - The inverse distribution function for the Poisson distribution: poisson_icdf
- Normal distributions
  - The probability density function for a normal distribution: normald loi_normal
  - The cumulative distribution function for normal distributions: normal_cdf normald_cdf
  - The inverse distribution function for normal distributions: normal_icdf normald_icdf
  - The upper tail cumulative function for normal distributions: UTPN
- Student’s distribution
  - The probability density function for Student’s distribution: student studentd
  - The cumulative distribution function for Student’s distribution: student_cdf
  - The inverse distribution function for Student’s distribution: student_icdf
  - The upper tail cumulative function for Student’s distribution: UTPT
- The χ2 distribution
  - The probability density function for the χ2 distribution: chisquare
  - The cumulative distribution function for the χ2 distribution: chisquare_cdf
  - The inverse distribution function for the χ2 distribution: chisquare_icdf
  - The upper tail cumulative function for the χ2 distribution: UTPC
- The Fisher-Snédécor distribution
  - The probability density function for the Fisher-Snédécor distribution: fisher fisherd snedecor snedecord
  - The cumulative distribution function for the Fisher-Snédécor distribution: fisher_cdf snedecor_cdf
  - The inverse distribution function for the Fisher-Snédécor distribution: fisher_icdf snedecor_icdf
  - The upper tail cumulative function for the Fisher-Snédécor distribution: UTPF
- The gamma distribution
  - The probability density function for the gamma distribution: gammad
  - The cumulative distribution function for the gamma distribution: gammad_cdf
  - The inverse distribution function for the gamma distribution: gammad_icdf
- The beta distribution
  - The probability density function for the beta distribution: betad
  - The cumulative distribution function for the beta distribution: betad_cdf
  - The inverse distribution function for the beta distribution: betad_icdf
- The geometric distribution
  - The probability density function for the geometric distribution: geometric
  - The cumulative distribution function of the geometric distribution: geometric_cdf
  - The inverse distribution function for the geometric distribution: geometric_icdf
- The Cauchy distribution
  - The probability density function for the Cauchy distribution: cauchy cauchyd
  - The cumulative distribution function for the Cauchy distribution: cauchy_cdf cauchyd_cdf
  - The inverse distribution function for the Cauchy distribution: cauchy_icdf cauchyd_icdf
- The uniform distribution
  - The probability density function for the uniform distribution: uniform uniformd
  - The cumulative distribution function for the uniform distribution: uniform_cdf uniformd_cdf
  - The inverse distribution function for the uniform distribution: uniform_icdf uniformd_icdf
- The exponential distribution
  - The probability density function for the exponential distribution: exponential exponentiald
  - The cumulative distribution function for the exponential distribution: exponential_cdf exponentiald_cdf
  - The inverse distribution function for the exponential distribution: exponential_icdf exponentiald_icdf
- The Weibull distribution
  - The probability density function for the Weibull distribution: weibull weibulld
  - The cumulative distribution function for the Weibull distribution: weibull_cdf weibulld_cdf
  - The inverse distribution function for the Weibull distribution: weibull_icdf weibulld_icdf
- The Kolmogorov-Smirnov distribution: kolmogorovd
- The Wilconon or Mann-Whitney distribution
- The Wilconon test polynomial: wilcoxonp
  - The Wilcoxon/Mann-Whitney statistic: wilcoxons
  - The Wilcoxon or Mann-Whitney test
- Moment generating functions for probability distributions: mgf
- Cumulative distribution functions: cdf
- Inverse distribution functions: icdf
- Kernel density estimation : kernel_density, kde
- Distribution fitting by maximum likelihood : fitdistr
- Markov chains: markov
- Generating a random walks: randmarkov

## 7.5 Hypothesis testing

- General
- Testing the mean with the Z test: normalt
- Testing the mean with the T test: studentt
- Testing a distribution with the χ2 distribution: chisquaret
- Testing a distribution with the Kolmogorov-Smirnov distribution: kolmogorovt

# Chapter 8 Numerical computations

Real numbers may have an exact representation (e.g. rationals, symbolic expressions involving square roots or constants like π, ...) or approximate representation, which means that the real is represented by a rational (with a denominator that is a power of the basis of the representation) close to the real. Inside Xcas, the standard scientific notation is used for approximate representation, that is a mantissa (with a point as decimal separator) optionally followed by the letter e and an integer exponent.

Note that the real number 10−4 is an exact number but 1e−4 is an approximate representation of this number.

## 8.1 Floating point representation.

In this section, we explain how real numbers are represented.

- Digits
- Representation by hardware floats
- Examples of representations of normalized floats
- Difference between the representation of (3.1-3) and of 0.1

## 8.2 Approx. evaluation : evalf approx and Digits

evalf or approx evaluates to a numeric approximation (if possible).
Input :

evalf(sqrt(2))

Output, if in the cas configuration (Cfg menu) Digits=7 (that is hardware floats are used, and 7 digits are displayed) :

1.414214

You can change the number of digits in a command line by assigning the variable DIGITS or Digits. Input :

DIGITS:=20
evalf(sqrt(2))

Output :

1.4142135623730950488

Input :

evalf(10`^`-5)

Output :

1e-05

Input :

evalf(10`^`15)

Output :

1e+15

Input :

evalf(sqrt(2))*10`^`-5

Output :

1.41421356237e-05

## 8.3 Numerical algorithms

- Approximate solution of an equation : newton
- Approximate computation of the derivative number : nDeriv
- Approximate computation of integrals : romberg nInt
- Approximate solution of y’=f(t,y) : odesolve
- Approximate solution of the system v’=f(t,v) : odesolve
- Approximate solution of a nonlinear second-order boundary value problem : bvpsolve

## 8.4 Solve equations with fsolve nSolve

fsolve or nSolve solves numeric equations (unlike solve or proot, it is not limited to polynomial equations) of the form:

f(x)=0, x ∈ ]a,b[

fsolve or nSolve accepts a last optional argument, the name of an iterative algorithm to be used by the GSL solver. The different methods are explained in the following section.

- fsolve or nSolve with the option bisection_solver
- fsolve or nSolve with the option brent_solver
- fsolve or nSolve with the option falsepos_solver
- fsolve or nSolve with the option newton_solver
- fsolve or nSolve with the option secant_solver
- fsolve or nSolve with the option steffenson_solver

## 8.5 Solve systems with fsolve

Xcas provides six methods (inherited from the GSL) to solve numeric systems of equations of the form f(x)=0:

- Three methods use the jacobian matrix f′(x) and their names are terminated with j_solver.
- The three other methods use approximation for f′(x) and use only f.

All methods use an iteration of Newton kind

xn+1=xn−f′(xn)−1*f(xn)

The four methods hybrid*_solver use also a method of gradient descent when the Newton iteration would make a too large step. The length of the step is computed without scaling for hybrid_solver and hybridj_solver or with scaling (computed from f′(xn)) for hybrids_solver and hybridsj_solver.

- fsolve with the option dnewton_solver
- fsolve with the option hybrid_solver
- fsolve with the option hybrids_solver
- fsolve with the option newtonj_solver
- fsolve with the option hybridj_solver
- fsolve with the option hybridsj_solver

## 8.6 Numeric roots of a polynomial : proot

proot takes as argument a squarefree polynomial, either in symbolic form or as a list of polynomial coefficients (written by decreasing order).
proot returns a list of the numeric roots of this polynomial.
To find the numeric roots of P(x)=x3+1, input :

proot([1,0,0,1])

or :

proot(x`^`3+1)

Output :

[0.5+0.866025403784*i,0.5-0.866025403784*i,-1.0]

To find the numeric roots of x2−3, input :

proot([1,0,-3])

or :

proot(x`^`2-3)

Output :

[1.73205080757,-1.73205080757]

## 8.7 Numeric factorization of a matrix : cholesky qr lu svd

Matrix numeric factorizations of

- Cholesky,
- QR,
- LU,
- svd,

are described in section 5.52.

# Chapter 9 Unit objects and physical constants

The Phys menu contains:

- the physical constants (Constant sub-menu),
- the unit conversion functions (Unit_convert sub-menu),
- the unit prefixes (Unit_prefix sub-menu)
- the unit objects organized by subject

## 9.1 Unit objects

- Notation of unit objects
- Computing with units
- Convert units into MKSA units : mksa
- Convert units : convert
- Factorize a unit : ufactor
- Simplify a unit : usimplify
- Unit prefixes

## 9.2 Constants

- Notation of physical constants
- Constants Library

# Chapter 10 Programming

## 10.1 Functions, programs and scripts

- The program editor
- Functions
- Local variables
- Default values of the parameters
- Programs
- Scripts
- Code blocks

## 10.2 Basic instructions

- Comments
- Input
- Reading a single keystroke
- Checking conditions with assert
- Checking the type of the argument
- Printing
- Displaying exponents

## 10.3 Control structures

- if statements
- The switch statement
- The for loop
- The repeat loop
- The while loop
- Breaking out a loop
- Going to the next iteration of a loop
- Changing the order of execution

## 10.4 Other useful instructions

- Assignments in a program
- Writing variable values to a file
- Writing output to a file
- Using strings as names
- Using strings as commands
- Converting an expression to a string
- Working with the graphics screen
- Pausing a program
- Dealing with errors

## 10.5 Debugging

- Starting the debugger

# Chapter 11 Two-dimensional Graphics

## 11.1 Introduction

- Points, vectors and complex numbers

## 11.2 Basic commands

- Clear the DispG screen: erase
- Toggle the axes: switch_axes
- Draw unit vectors in the plane: Ox_2d_unit_vector Oy_2d_unit_vector frame_2d
- Draw dotted paper: dot_paper
- Draw lined paper: line_paper
- Draw grid paper: grid_paper
- Draw triangular paper: triangle_paper

## 11.3 Display features of graphics

- Graphic features
- Parameters for changing features
  - Parameters for local features
  - Parameters for global features
- Commands for global display features
  - Add a legend: legend
  - Change various features:display color

## 11.4 Define geometric objects without drawing them: nodisp

The nodisp command will define an object without displaying it. Setting a variable to a graphic object draws the object.
Input:

C := point(1+i)

will define the point C as well as draw it. Setting a variable to a graphic object inside the nodisp command will not draw the object.
Input:

nodisp(C:= point(1+i))

will define the point C but not display it. This is equivalent to following the command with :;,
Input:

C := point(1+i):;

To define a point as above and display it without the label, enter the point’s name;
Input:

C

Alternatively, define the point within an eval statement;
Input:

eval(C := point(1+i))

defines C as the point, displays the point, but doesn’t display the label. To later display the point with a label, use the legend command.
Input:

legend(C,"C")

or:

point(affix(C),legend="C")

Output:

In this case, the string "C" can be replaced with any other string as a label. Alternatively, redefine the variable as itself;
Input:

C := C

prints C with its label.

## 11.5 Geometric demonstrations: assume

Variables should be unspecified to demonstrate a general geometric result, but need to have specific values when drawing. There are a couple of different approaches of dealing with this.

One approach is to use the assume command. If a variable is assumed to have a value, then that value will be used in graphics but the variable will still be unspecified for calculations. For example,
Input:

assume(a = 2.1)

then
Input:

A := point(a + i)

will draw a point at the coordinate (2.1,1),
Output:

but the variable a will still be treated as a variable in calculations;
Input:

distance(0,A)

Output:

sqrt((-a)^2 + 1)

Another approach would be to use point or pointer mode in a geometry screen. If there isn’t a geometry screen showing, the command Alt-G or the Geo▸New figure 2d menu will open a screen. Clicking on the Mode button right above the graphic screen and choosing pointer or point will put the screen in pointer or point mode. If a point is defined and displayed, such as with A := point(2.1 + i), then clicking on the name of the point (A in this case) with the right mouse button will bring up a configuration screen. As long as there is a point defined with non-symbolic values, there sill be a symb box on the configuration screen. Selecting the symb box and choosing OK will be equivalent to the commands assume(Ax=[2.1,-8.16901408451,8.16901408451]) and assume(Ay = [1, -5.0, 5.0], this will bring up two lines beneath the arrows to the right of the screen which can be used to change the assumed values of Ax and Ay. Also, the point A will be redefined as point(Ax,Ay).

## 11.6 Points in the plane

- Points and complex numbers
- The point in the plane: point
- Define random points in the plane: point2d
- Points in polar coordinates: polar_point point_polar
- Find a point of intersection of two objects in the plane: single_inter line_inter
- Find the points of intersection of two geometric objects in the plane: inter
- Find the orthocenter of a triangle in the plane: orthocenter
- Find the midpoint of a segment in the plane: midpoint
- The barycenter in the plane: barycenter
- The isobarycenter of n points in the plane: isobarycenter
- The center of a circle in the plane: center
- The vertices of a polygon in the plane: vertices vertices_abc
- The vertices of a polygon in the plane, closed: vertices_abca
- A point on a geometric object in the plane: element

## 11.7 Lines in plane geometry

- Lines and directed lines in the plane: line
- Half-lines in the plane
- Line segments in the plane: segment Line
- Vectors in the plane: segment vector
- Parallel lines in the plane: parallel
- Perpendicular lines in the plane: perpendicular
- Tangents to curves in the plane: tangent
- The median of a triangle in the plane: median_line
- The altitude of a triangle: altitude
- The perpendicular bisector of a segment in the plane: perpen_bisector
- The angle bisector: bisector
- The exterior angle bisector

## 11.8 Triangles in the plane

See section 12.7 for triangles in space.

- Arbitrary triangles in the plane: triangle
- Isosceles triangles in the plane: isosceles_triangle
- Right triangles in the plane: right_triangle
- Equilateral triangles in the plane: equilateral_triangle

## 11.9 Quadrilaterals in the plane

See section 12.8 for quadrilaterals in space.

- Squares in the plane: square
- Rhombuses in the plane: rhombus
- Rectangles in the plane: rectangle
- Parallelograms in the plane: parallelogram
- Arbitrary quadrilaterals in the plane: quadrilateral

## 11.10 Other polygons in the plane

See section 12.9 for polygons in space.

- Regular hexagons in the plane: hexagon
- Regular polygons in the plane: isopolygon
- General polygons in the plane: polygon
- Polygonal lines in the plane: open_polygon
- Convex hulls: convexhull

## 11.11 Circles

- Circles and arcs in the plane: circle
- Circular arcs: arc
- Circles (TI compatibility): Circle
- Inscribed circles: incircle
- Circumscribed circles: circumcircle
- Excircles: excircle
- The power of a point relative to a circle: powerpc
- The radical axis of two circles: radical_axis

## 11.12 Other conic sections

- The ellipse in the plane: ellipse
- The hyperbola in the plane: hyperbola
- The parabola in the plane: parabola

## 11.13 Coordinates in the plane

- The affix of a point or vector: affix
- The abscissa of a point or vector in the plane: abscissa
- The ordinate of a point or vector in the plane: ordinate
- The coordinates of a point, vector or line in the plane: coordinates
- The rectangular coordinates of a point: rectangular_coordinates
- The polar coordinates of a point: polar_coordinates
- The Cartesian equation of a geometric object in the plane: equation
- The parametric equation of a geometric object in the plane: parameq

## 11.14 Measurements

- Measurement and display: distanceat distanceatraw angleat angleatraw areaat areaatraw perimeterat perimeteratraw slopeat slopeatraw extract_measure
- The distance between objects in the plane: distance
- The length squared of a segment in the plane: distance2
- The measure of an angle in the plane: angle
- The graphical representation of the area of a polygon: plotareaareaplot
- The area of a polygon: area
- The perimeter of a polygon: perimeter
- The slope of a line: slope
- The radius of a circle: radius
- The length of a vector: abs
- The angle of a vector: arg
- Normalize a complex number: normalize

## 11.15 Transformations

- General remarks
- Translations in the plane: translation
- Reflections in the plane: reflection
- Rotation in the plane: rotation
- Homothety in the plane: homothety
- Similarity in the plane: similarity
- Inversion in the plane: inversion
- Orthogonal projection in the plane: projection

## 11.16 Properties

- Check if a point is on an object in the plane: is_element
- Check if three points are collinear in the plane: is_collinear
- Check if four points are concyclic in the plane: is_concyclic
- Check if a point is in a polygon or circle: is_inside
- Check if an object is an equilateral triangle in the plane: is_equilateral
- Check if an object in the plane is an isosceles triangle: is_isosceles
- Check if an object in the plane is a right triangle or a rectangle: is_rectangle
- Check if an object in the plane is a square: is_square
- Check if an object in the plane is a rhombus: is_rhombus
- Check if an object in the plane is a parallelogram: is_parallelogram
- Check it two lines in the plane are parallel: is_parallel
- Check if two lines in the plane are perpendicular: is_perpendicular
- Check if two circles in the plane are orthogonal: is_orthogonal
- Check if elements are conjugates: is_conjugate
- Check if four points form a harmonic division: is_harmonic
- Check if lines are in a bundle: is_harmonic_line_bundle
- Check if circles are in a bundle: is_harmonic_circle_bundle

## 11.17 Harmonic division

- Find a point dividing a segment in the harminic ratio k: division_point
- The cross ratio of four collinear points: cross_ratio
- Harmonic division: harmonic_division
- The harmonic conjugate: harmonic_conjugate
- Pole and polar: pole polar
- The polar reciprocal: reciprocation

## 11.18 Loci and envelopes

- Loci: locus
  - The locus of points depending on points on a curve.
  - The envelope of a family of lines which depend on points on a curve.
- Envelopes: envelope

# Chapter 12 Three-dimensional Graphics

## 12.1 Introduction

The Alt+H command brings up a display screen for three-dimensional graphics. This screen has its own menu and command lines.

This screen also automatically appears whenever there is a three-dimensional graphic command.

The plane of vision for a three-dimensional graphic screen is perpendicular to the observer’s line of vision. The plane of vision is also indicated by dotted lines showing its intersection with the parallelepiped. The axis of vision for a three-dimensional graphic screen is

The three-dimensional graphic screen starts with the image of a parallelepiped bounding the graphics and vectors in the x, y and z directions. At the top of the screen is the equation of the plane of vision, which is a plane perpendicular to the observer’s line of vision. The plane of vision is shown graphically with dotted lines indicating where it intersects the plane of vision.

Clicking in the graphic screen outside of the parallelepiped and dragging the mouse moves the x, y and z directions relative to the observer; these directions are also changed with the x, X, y, Y, z and Z keys. Scrolling the mouse wheel moves the plane of vision along the line of vision. The in and out buttons on the graphic screen menu zoom in and out of the picture.

The graphical features available for two-dimensional graphics (see section 11.3) are also available for three-dimensional graphics, but to see the points the markers must be squares with width (point_width) at least 3.

The graphic screen menu has a cfg button which brings up a configuration screen. Among other things, this screen has

- An Ortho proj button, which determines whether the drawing uses orthogonal projection or perspective projection.
- A Lights button, which determines whether the objects are lit or not; the locations of eight points for lighting are set using the buttons L1, …, L7, which specify the points with homogeneous coordinates.
- A Show axis button, which determines whether or not the outlining parallelepiped is visible.

## 12.2 Change the view

The depictions of three-dimensional objects are made with a coordinate system Oxyz, where the x axis is horizontal and directed right, the y axis is vertical and directed up, and the z axis is perpendicular to the screen and directed out of the screen. The depictions can be transformed by changing to a different coordinate system by setting a quaternion. (See section 11.3.2.)

## 12.3 The axes

- Draw unit vectors: Ox_3d_unit_vector Oy_3d_unit_vector Oz_3d_unit_vector frame_3d

## 12.4 Points in space

- Define a point in three-dimensions: point
- Define a random point in three-dimensions: point3d
- Find an intersection point of two objects in space: single_inter line_inter
- Find the intersection points of two objects in space: inter
- Find the midpoint of a segment in space: midpoint
- Find the isobarycenter of a set of points in space: isobarycenter
- Find the barycenter of a set of points in space: barycenter

## 12.5 Lines in space

- Lines and directed lines in space: line
- Half lines in space: half_line
- Segments in space: segment
- Vectors in space: vector
- Parallel lines and planes in space: parallel
- Perpendicular lines and planes in space: perpendicular
- Planes orthogonal to lines and lines orthogonal to planes in space: orthogonal
- Common perpendiculars to lines in space: common_perpendicular

## 12.6 Planes in space

See also sections 12.5.6 and 12.5.7 for planes perpendicular and orthogonal to lines and planes.

- Planes in space: plane
- The bisector plane in space: perpen_bisector
- Tangent planes in space: tangent

## 12.7 Triangles in space

- Draw a triangle in space: triangle
- Isosceles triangles in space: isosceles_triangle
- Right triangles in space: right_triangle
- Equilateral triangles in space: equilateral_triangle

## 12.8 Quadrilaterals in space

See section 11.9 for quadrilaterals in the plane.

- Squares in space: square
- Rhombuses in space: rhombus
- Rectangles in space: rectangle
- Parallelograms in space: parallelogram

## 12.9 Polygons in space

See section 11.10 for polygons in the plane.

- Hexagons in space: hexagon
- Regular polygons in space: isopolygon
- General polygons in space: polygon
- Polygonal lines in space: open_polygon

## 12.10 Circles in space: circle

See section 11.11.1 for circles in the plane.

The circle command returns and draws a circle.

circle takes as arguments one of the following:

- Three points, A, B and C.
  circle will return and draw the circle with a diameter AB, and the third point C determines the plane.
  Input:
  circle(point(0,0,1),point(0,1,0),point(0,2,2))
  Output:
- A point A, a vector v and another point C.
  circle will return and draw the circle with center at A and with A+v on the circle. The point C determines the plane.
  Input:
  circle(point(0,0,1),vector(0,1,0),point(0,2,2))
  Output:

In both cases, the first and third arguments can be the coordinates of the point.

## 12.11 Conics in space

- Ellipses in space: ellipse
- Hyperbolas in space: hyperbola
- Parabolas in space: parabola

## 12.12 Three-dimensional coordinates

- The abscissa of a three-dimensional point: abscissa
- The ordinate of a three-dimensional point: ordinate
- The cote of a three-dimensional point: cote
- The coordinates of a point, vector or line in space: coordinates
- The Cartesian equation of an object in space: equation
- The parametric equation of an object in space: parameq
- The length of a segment in space: distance
- The length squared of a segment in space: distance2
- The measure of an angle in space: angle

## 12.13 Properties

- Check if an object in space is on another object: is_element
- Check if points and/or lines in space are coplanar: is_coplanar
- Check if lines and/or planes in space are parallel: is_parallel
- Check if lines and/or planes in space are perpendicular: is_perpendicular
- Check if two lines or two spheres in space are orthogonal: is_orthogonal
- Check if three points in space are collinear: is_collinear
- Check if four points in space are cocyclic: is_concyclic
- Check if five points in space are cospherical: is_cospherical
- Check if an object in space is an equilateral triangle: is_equilateral
- Check if an object in space is an isosceles triangle: is_isosceles
- Check if an object in space is a right triangle or a rectangle: is_rectangle
- Check if an object in space is a square: is_square
- Check if an object in space is a rhombus: is_rhombus
- Check if an object in space is a parallelogram: is_parallelogram

## 12.14 Transformations in space

- General remarks
- Translation in space: translation
- Reflection in space with respect to a plane, line or point: reflection symmetry
- Rotation in space: rotation
- Homothety in space: homothety
- Similarity in space: similarity
- Inversion in space: inversion
- Orthogonal projection in space: projection

## 12.15 Surfaces

- Cones: cone
- Half-cones: half_cone
- Cylinders: cylinder
- Spheres: sphere
- The graph of a function of two variables: funcplot
- The graph of parametric equations in space: paramplot

## 12.16 Solids

- Cubes: cube
- Tetrahedrons: tetrahedron pyramid
- Parallelepipeds: parallelepiped
- Prisms: prism
- Polyhedra: polyhedron
- Vertices: vertices
- Faces: faces
- Edges: line_segments

## 12.17 Platonic solids

To specify a Platonic solid, Xcas works with the center, a vertex and a third point to specify a plane of symmetry. To speed up calculations, it may be useful to use approximate calculations, which can be ensured with the evalf command. For example, instead of:
Input:

centered_cube([0,0,0],[3,2,1],[1,1,0])

it would typically be better to use:
Input:

centered_cube(evalf([0,0,0],[3,2,1],[1,1,0]))

- Centered tetrahedra: centered_tetrahedron
- Centered cubes: centered_cube
- Octahedra: octahedron
- Dodecahedra: dodecahedron
- Icosahedra: icosahedron

# Chapter 13 Multimedia

## 13.1 Sounds

- Reading a wav file: readwav
- Writing a wav file: writewav
- Listening to a digital sound: playsnd
- Preparing digital sound data: soundsec

## 13.2 Images

- Image structure in Xcas
- Reading images: readrgb
- Viewing images
- Creating or recreating images: writergb
  - Writing images given in Xcas format
  - Creating images

1
  Université de Grenoble, initial translation of parts of the French user manual
2
  Full translation and improvements
3
  Optimization, signal processing. The graph theory is in a separate manual.

> This document was translated from LATEX by HEVEA .