(C1) ATVALUE(F(X,Y),[X=0,Y=1],A**2)$ The form must be a function, f(v1,v2,...), or a derivative,
DIFF(f(v1,v2,...),vi,ni,vj,nj,...) in which the functional arguments explicitly appear (ni is the order of differentiation with respect vi). The list of equations determine the "boundary" at which the value is given; list may be a list of equations, as above, or a single equation, vi = expr. The symbols @1, @2,... will be used to represent the functional variables v1,v2,... when atvalues are displayed. PRINTPROPS([f1, f2,...], ATVALUE) will display the atvalues of the functions f1,f2,... as specified in previously given uses of the ATVALUE function. If the list contains just one element then the element can be given without being in a list. If a first argument of ALL is given then atvalues for all functions which have them will be displayed. Do EXAMPLE(ATVALUE); for an example.
(C1) LAPLACE(DELTA(T-A)*SIN(B*T),T,S); Is A positive, negative or zero? POS; - A S (D1) SIN(A B) %E
informs DIFF that F and G depend on X and Y, that R and S depend on U,V, and W, and that U depends on T. The arguments to DEPENDS are evaluated. The variables in each funlist are declared to depend on all the variables in the next varlist. A funlist can contain the name of an atomic variable or array. In the latter case, it is assumed that all the elements of the array depend on all the variables in the succeeding varlist. Initially, DIFF(F,X) is 0; executing DEPENDS(F,X) causes future differentiations of F with respect to X to give dF/dX or Y (if DERIVABBREV:TRUE).
(C1) DEPENDS([F,G],[X,Y],[R,S],[U,V,W],U,T); (D1) [F(X, Y), G(X, Y), R(U, V, W), S(U, V, W), U(T)] (C2) DEPENDENCIES; (D2) [F(X, Y), G(X, Y), R(U, V, W), S(U, V, W), U(T)] (C3) DIFF(R.S,U); dR dS (D3) -- . S + R . -- dU dU
Since MACSYMA knows the chain rule for symbolic derivatives, it takes advantage of the given dependencies as follows:
(C4) DIFF(R.S,T); dR dU dS dU (D4) (-- --) . S + R . (-- --) dU dT dU dT If we set (C5) DERIVABBREV:TRUE; (D5) TRUE then re-executing the command C4, we obtain (C6) ''C4; (D6) (R U ) . S + R . (S U ) U T U T
To eliminate a previously declared dependency, the REMOVE command can be used. For example, to say that R no longer depends on U as declared in C1, the user can type
This will eliminate all dependencies that may have been declared for R.
(C7) REMOVE(R,DEPENDENCY); (D7) DONE (C8) ''C4; (D8) R . (S U ) U T
CAVEAT: DIFF is the only MACSYMA command which uses DEPENDENCIES information. The arguments to INTEGRATE, LAPLACE, etc. must be given their dependencies explicitly in the command, e.g., INTEGRATE(F(X),X).
(C1) 'DIFF(Y,X,2)+'DIFF(Y,Z,3)*2+'DIFF(Y,X)*X**2$ (C2) DERIVDEGREE(%,Y,X); (D2) 2
If DERIVSUBST is set to true, this gives 'DIFF(X,T).
(C1) DIFF(EXP(F(X)),X,2); 2 F(X) d F(X) d 2 (D1) %E (--- F(X)) + %E (-- (F(X))) 2 dX dX (C2) DERIVABBREV:TRUE$ (C3) 'INTEGRATE(F(X,Y),Y,G(X),H(X)); H(X) / [ (D3) I F(X, Y) dY ] / G(X) (C4) DIFF(%,X); H(X) / [ (D4) I F(X, Y) dY + F(X, H(X)) H(X) - F(X, G(X)) G(X) ] X X X / G(X)
For the tensor package, the following modifications have been incorporated: 1) the derivatives of any indexed objects in exp will have the variables vi appended as additional arguments. Then all the derivative indices will be sorted. 2) the vi may be integers from 1 up to the value of the variable DIMENSION[default value: 4]. This will cause the differentiation to be carried out wrt the vith member of the list COORDINATES which should be set to a list of the names of the coordinates, e.g., [x,y,z,t]. If COORDINATES is bound to an atomic variable, then that variable subscripted by vi will be used for the variable of differentiation. This permits an array of coordinate names or subscripted names like X, X,... to be used. If COORDINATES has not been assigned a value, then the variables will be treated as in 1) above.
(C41) DEPENDENCIES(FIELD(R)); (D41) [FIELD(R)] (C42) DSCALAR(FIELD); (D43) -M %E ((FIELD N - FIELD M + 2 FIELD ) R + 4 FIELD ) R R R R R R R - ----------------------------------------------------- 2 R
and you can try, for example,
by using GENDIFF rather than DIFF. Unevaluable items come out quoted. Some items are in terms of "GENFACT", which see.
(C1) LAPLACE(%E**(2*T+A)*SIN(T)*T,T,S); A 2 %E (S - 2) (D1) --------------- 2 2 ((S - 2) + 1)