1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952
|
% TeX code generated by batTeX. Don't edit this file; edit the
% input file pdiff.tex instead.
\documentclass[12pt]{article}
\usepackage{mathptm}
\usepackage{battex}
\usepackage{color}
\title{A positional derivative package for Maxima}
\author{Barton Willis \\
University of Nebraska at Kearney \\
Kearney Nebraska}
\date{September 10, 2002\footnote{With minor updates November, 2006.}}
\begin{document}
\maketitle
\subsection*{Introduction}
\noindent Working with derivatives of unknown functions\footnote{By
{\em unknown function\/}, we mean a function that isn't bound to a formula and
that has a derivative that isn't known to Maxima.} can be cumbersome in Maxima.
If we want, for example, the first order Taylor polynomial of
$f(x + x^2)$ about $x = 1$, we get
\begin{mcline}{c1}
taylor(f(x + x^2),x,1,1);
\end{mcline}
\begin{mdline}{d1}
f\left(2\right)+\left(\left.{{d}\over{d\,x}}\,f\left(x^2+x\right)
\right|_{x=1}\right)\,\left(x-1\right)+\cdots
\end{mdline}
\noindent To ``simplify'' the Taylor polynomial, we must assign a gradient to $f$
\begin{mcline}{c2}
gradef(f(x),df(x))$
\end{mcline}
\begin{mcline}{c3}
taylor(f(x+x^2),x,1,1);
\end{mcline}
\begin{mdline}{d3}
f\left(2\right)+3\,df\left(2\right)\,\left(x-1\right)+\cdots
\end{mdline}
This method works well for simple problems, but it
is tedious for functions of several variables or high order
derivatives. The positional derivative package {\tt pdiff} gives
an alternative to using {\tt gradef} when working with derivatives
of unknown functions.
\subsection*{Usage}
To use the positional derivative package, first load it from the Maxima input prompt.
\begin{mcline}{c1}
load(pdiff)$
\end{mcline}
\noindent Loading
{\tt pdiff.lisp} sets the option variable {\tt use\_pdiff} to true;
when {\tt use\_diff} is true, Maxima will
indicate derivatives of unknown functions positionally. To illustrate,
the first three derivatives of $f$ are
\begin{mcline}{c2}
[diff(f(x),x),
diff(f(x),x,2),
diff(f(x),x,3)];
\end{mcline}
\begin{mdline}{d2}
\left[ f_{\left(1\right)}(x),f_{\left(2\right)}(x),f_{\left(3
\right)}(x) \right]
\end{mdline}
The subscript indicates the order of the derivative; since $f$ is a function of
one variable, the subscript has only one index. When a function has more
than one variable, the subscript has an index for each variable
\begin{mcline}{c3}
[diff(f(x,y),x,0,y,1), diff(f(y,x),x,0,y,1)];
\end{mcline}
\begin{mdline}{d3}
\left[ f_{\left(0,1\right)}(x,y),f_{\left(1,0\right)}(y,x)
\right]
\end{mdline}
\noindent Setting {\tt use\_pdiff} to false (either locally or globally) inhibits
derivatives from begin computed positionally
\begin{mcline}{c4}
diff(f(x,x^2),x), use_pdiff : false;
\end{mcline}
\begin{mdline}{d4}
{{d}\over{d\,x}}\,f\left(x,x^2\right)
\end{mdline}
\begin{mcline}{c5}
diff(f(x,x^2),x), use_pdiff : true;
\end{mcline}
\begin{mdline}{d5}
f_{\left(1,0\right)}(x,x^2)+2\,x\,f_{\left(0,1\right)}(x,x^2)
\end{mdline}
Taylor polynomials of unknown functions can be found without using
{\tt gradef}. An example
\begin{mcline}{c6}
taylor(f(x+x^2),x,1,2);
\end{mcline}
\begin{mdline}{d6}
f\left(2\right)+3\,f_{\left(1\right)}(2)\,\left(x-1\right)+{{
\left(2\,f_{\left(1\right)}(2)+9\,f_{\left(2\right)}(2)\right)\,
\left(x-1\right)^2}\over{2}}+\cdots
\end{mdline}
\noindent Additionally, we can verify that $ y = f(x-c \, t) + g(x+c \,t)$ is
a solution to a wave equation without using {\tt gradef}
\begin{mcline}{c7}
y : f(x-c*t) + g(x+c*t)$
\end{mcline}
\begin{mcline}{c8}
ratsimp(diff(y,t,2) - c^2 * diff(y,x,2));
\end{mcline}
\begin{mdline}{d8}
0
\end{mdline}
\begin{mcline}{c9}
remvalue(y)$
\end{mcline}
\noindent Expressions involving positional derivatives can be differentiated
\begin{mcline}{c10}
e : diff(f(x,y),x);
\end{mcline}
\begin{mdline}{d10}
f_{\left(1,0\right)}(x,y)
\end{mdline}
\begin{mcline}{c11}
diff(e,y);
\end{mcline}
\begin{mdline}{d11}
f_{\left(1,1\right)}(x,y)
\end{mdline}
\noindent The chain rule is applied when needed
\begin{mcline}{c12}
[diff(f(x^2),x), diff(f(g(x)),x)];
\end{mcline}
\begin{mdline}{d12}
\left[ 2\,x\,f_{\left(1\right)}(x^2),g_{\left(1\right)}(x)\,f_{
\left(1\right)}(g\left(x\right)) \right]
\end{mdline}
The positional derivative package doesn't alter the way known functions
are differentiated
\begin{mcline}{c13}
diff(exp(-x^2),x);
\end{mcline}
\begin{mdline}{d13}
-2\,x\,e^ {- x^2 }
\end{mdline}
\noindent To convert positional derivatives to standard Maxima derivatives,
use {\tt convert\_to\_diff}
\begin{mcline}{c14}
e : [diff(f(x),x), diff(f(x,y),x,1,y,1)];
\end{mcline}
\begin{mdline}{d14}
\left[ f_{\left(1\right)}(x),f_{\left(1,1\right)}(x,y) \right]
\end{mdline}
\begin{mcline}{c15}
e : convert_to_diff(e);
\end{mcline}
\begin{mdline}{d15}
\left[ {{d}\over{d\,x}}\,f\left(x\right),{{d^2}\over{d\,y\,d\,x}}
\,f\left(x,y\right) \right]
\end{mdline}
\noindent To convert back to a positional derivative, use {\tt ev} with {\tt diff}
as an argument
\begin{mcline}{c16}
ev(e,diff);
\end{mcline}
\begin{mdline}{d16}
\left[ f_{\left(1\right)}(x),f_{\left(1,1\right)}(x,y) \right]
\end{mdline}
\noindent Conversion to standard derivatives sometimes requires the
introduction of a dummy variable. Here's an example
\begin{mcline}{c17}
e : diff(f(x,y),x,1,y,1);
\end{mcline}
\begin{mdline}{d17}
f_{\left(1,1\right)}(x,y)
\end{mdline}
\begin{mcline}{c18}
e : subst(p(s),y,e);
\end{mcline}
\begin{mdline}{d18}
f_{\left(1,1\right)}(x,p\left(s\right))
\end{mdline}
\begin{mcline}{c19}
e : convert_to_diff(e);
\end{mcline}
\begin{mdline}{d19}
\left.{{d^2}\over{d\,\%x_0\,d\,x}}\,f\left(x,\%x_0\right)\right|_{
\left[ \%x_0=p\left(s\right) \right] }
\end{mdline}
Dummy variables have the form ci, where i=0,1,2\dots and c is the
value of the option variable {\tt dummy\_char}. The default value
for {\tt dummy\_char} is {\tt \%x}. If a user variable conflicts with a
dummy variable, the conversion process can give an
incorrect value. To convert the previous expression back to a positional derivative,
use {\tt ev} with {\tt diff} and {\tt at} as arguments
\begin{mcline}{c20}
ev(e,diff,at);
\end{mcline}
\begin{mdline}{d20}
f_{\left(1,1\right)}(x,p\left(s\right))
\end{mdline}
Maxima correctly evaluates expressions involving positional derivatives
if a formula is later given to the function. (Thus converting an unknown
function into a known one.) Here is an example; let
\begin{mcline}{c21}
e : diff(f(x^2),x);
\end{mcline}
\begin{mdline}{d21}
2\,x\,f_{\left(1\right)}(x^2)
\end{mdline}
\noindent Now, give $f$ a formula
\begin{mcline}{c22}
f(x) := x^5;
\end{mcline}
\begin{mdline}{d22}
f\left(x\right):=x^5
\end{mdline}
\noindent and evaluate {\tt e}
\begin{mcline}{c23}
ev(e);
\end{mcline}
\begin{mdline}{d23}
10\,x^9
\end{mdline}
\noindent This result is the same as
\begin{mcline}{c24}
diff(f(x^2),x);
\end{mcline}
\begin{mdline}{d24}
10\,x^9
\end{mdline}
\noindent In this calculation, Maxima first evaluates $f(x)$ to $x^{10}$ and then
does the derivative. Additionally, we can substitute a value for $x$
before evaluating
\begin{mcline}{c25}
ev(subst(2,x,e));
\end{mcline}
\begin{mdline}{d25}
5120
\end{mdline}
\noindent We can duplicate this with
\begin{mcline}{c26}
subst(2,x,diff(f(x^2),x));
\end{mcline}
\begin{mdline}{d26}
5120
\end{mdline}
\begin{mcline}{c27}
remfunction(f);
\end{mcline}
\begin{mdline}{d27}
\left[ f \right]
\end{mdline}
\noindent We can also evaluate a positional derivative using a local
function definition
\begin{mcline}{c28}
e : diff(g(x),x);
\end{mcline}
\begin{mdline}{d28}
g_{\left(1\right)}(x)
\end{mdline}
\begin{mcline}{c29}
e, g(x) := sqrt(x);
\end{mcline}
\begin{mdline}{d29}
{{1}\over{2\,\sqrt{x}}}
\end{mdline}
\begin{mcline}{c30}
e, g = sqrt;
\end{mcline}
\begin{mdline}{d30}
{{1}\over{2\,\sqrt{x}}}
\end{mdline}
\begin{mcline}{c31}
e, g = h;
\end{mcline}
\begin{mdline}{d31}
h_{\left(1\right)}(x)
\end{mdline}
\begin{mcline}{c32}
e, g = lambda([t],t^2);
\end{mcline}
\begin{mdline}{d32}
2\,x
\end{mdline}
\subsection*{The {\tt pderivop} function}
If $F$ is an atom and $i_1, i_2, \dots i_n$ are nonnegative
integers, then $ \mbox{pderivop}(F,i_1,i_2, \dots i_n)$, is the
function that has the formula
\[
\frac{\partial^{i_1 + i_2 + \cdots + i_n}}{\partial x_1^{i_1}
\partial x_2^{i_2} \cdots \partial x_n^{i_n}} F(x_1,x_2, \dots x_n).
\]
If any of the derivative arguments are not nonnegative integers,
we'll get an error
\begin{mcline}{c33}
pderivop(f,2,-1);
\end{mcline}
Each derivative order must be a nonnegative integer
\noindent The {\tt pderivop} function can be composed with itself
\begin{mcline}{c34}
pderivop(pderivop(f,3,4),1,2);
\end{mcline}
\begin{mdline}{d34}
f_{\left(4,6\right)}
\end{mdline}
\noindent If the number of derivative arguments between two calls
to {\tt pderivop} isn't the same, Maxima gives an error
\begin{mcline}{c35}
pderivop(pderivop(f,3,4),1);
\end{mcline}
The function f expected 2 derivative argument(s), but it received 1
When {\tt pderivop} is applied to a known function, the result is
a lambda form\footnote{If you repeat theses calculations, you
may get a different prefix for the {\tt gensym} variables.}
\begin{mcline}{c37}
f(x) := x^2;
\end{mcline}
\begin{mdline}{d37}
f\left(x\right):=x^2
\end{mdline}
\begin{mcline}{c38}
df : pderivop(f,1);
\end{mcline}
\begin{mdline}{d38}
\lambda\left(\left[ Q_{1253} \right] ,2\,Q_{1253}\right)
\end{mdline}
\begin{mcline}{c39}
apply(df,[z]);
\end{mcline}
\begin{mdline}{d39}
2\,z
\end{mdline}
\begin{mcline}{c40}
ddf : pderivop(f,2);
\end{mcline}
\begin{mdline}{d40}
\lambda\left(\left[ Q_{1254} \right] ,2\right)
\end{mdline}
\begin{mcline}{c41}
apply(ddf,[10]);
\end{mcline}
\begin{mdline}{d41}
2
\end{mdline}
\begin{mcline}{c42}
remfunction(f);
\end{mcline}
\begin{mdline}{d42}
\left[ f \right]
\end{mdline}
If the first argument to {\tt pderivop} is a lambda form, the
result is another lambda form
\begin{mcline}{c43}
f : pderivop(lambda([x],x^2),1);
\end{mcline}
\begin{mdline}{d43}
\lambda\left(\left[ Q_{1255} \right] ,2\,Q_{1255}\right)
\end{mdline}
\begin{mcline}{c44}
apply(f,[a]);
\end{mcline}
\begin{mdline}{d44}
2\,a
\end{mdline}
\begin{mcline}{c45}
f : pderivop(lambda([x],x^2),2);
\end{mcline}
\begin{mdline}{d45}
\lambda\left(\left[ Q_{1256} \right] ,2\right)
\end{mdline}
\begin{mcline}{c46}
apply(f,[a]);
\end{mcline}
\begin{mdline}{d46}
2
\end{mdline}
\begin{mcline}{c47}
f : pderivop(lambda([x],x^2),3);
\end{mcline}
\begin{mdline}{d47}
\lambda\left(\left[ Q_{1257} \right] ,0\right)
\end{mdline}
\begin{mcline}{c48}
apply(f,[a]);
\end{mcline}
\begin{mdline}{d48}
0
\end{mdline}
\begin{mcline}{c49}
remvalue(f)$
\end{mcline}
If the first argument to {\tt pderivop} isn't an atom or
a lambda form, Maxima will signal an error
\begin{mcline}{c50}
pderivop(f+g,1);
\end{mcline}
Non-atom g+f used as a function
You may use {\tt tellsimpafter} together with {\tt pderivop} to
give a value to a derivative of a function at a point; an
example
\begin{mcline}{c51}
tellsimpafter(pderivop(f,1)(1),1)$
\end{mcline}
\begin{mcline}{c52}
tellsimpafter(pderivop(f,2)(1),2)$
\end{mcline}
\begin{mcline}{c53}
diff(f(x),x,2) + diff(f(x),x)$
\end{mcline}
\begin{mcline}{c54}
subst(1,x,%);
\end{mcline}
\begin{mdline}{d54}
3
\end{mdline}
This technique works for functions of several variables as well
\begin{mcline}{c55}
kill(rules)$
\end{mcline}
\begin{mcline}{c56}
tellsimpafter(pderivop(f,1,0)(0,0),a)$
\end{mcline}
\begin{mcline}{c57}
tellsimpafter(pderivop(f,0,1)(0,0),b)$
\end{mcline}
\begin{mcline}{c58}
sublis([x = 0, y = 0], diff(f(x,y),x) + diff(f(x,y),y));
\end{mcline}
\begin{mdline}{d58}
b+a
\end{mdline}
\subsection*{\TeX{}-ing positional derivatives}
Several option variables control how positional derivatives
are converted to \TeX{}. When the option variable
{\tt tex\_uses\_prime\_for\_derivatives} is true (default false),
makes functions of one variable \TeX{} as superscripted primes
\begin{mcline}{c59}
tex_uses_prime_for_derivatives : true$
\end{mcline}
\begin{mcline}{c60}
tex(makelist(diff(f(x),x,i),i,1,3))$
\end{mcline}
\begin{mdline}{d60}
\left[ f^{\prime}(x),f^{\prime\prime}(x),f^{\prime\prime\prime}(x)
\right]
\end{mdline}
\begin{mcline}{c61}
tex(makelist(pderivop(f,i),i,1,3))$
\end{mcline}
\[
\left[ f^{\prime},f^{\prime\prime},f^{\prime\prime\prime} \right]
\]
When the derivative order exceeds the value of the option
variable {\tt tex\_prime\_limit}, (default 3)
derivatives are indicated with parenthesis delimited superscripts
\begin{mcline}{c62}
tex(makelist(pderivop(f,i),i,1,5)), tex_prime_limit : 0$
\end{mcline}
\[
\left[ f^{(1)},f^{(2)},f^{(3)},f^{(4)},f^{(5)} \right]
\]
\begin{mcline}{c63}
tex(makelist(pderivop(f,i),i,1,5)), tex_prime_limit : 5$
\end{mcline}
\[
\left[ f^{\prime},f^{\prime\prime},f^{\prime\prime\prime},f^{\prime
\prime\prime\prime},f^{\prime\prime\prime\prime\prime} \right]
\]
The value of {\tt tex\_uses\_prime\_for\_derivatives} doesn't change the way
functions of two or more variables are converted to \TeX{}.
\begin{mcline}{c64}
tex(pderivop(f,2,1));
\end{mcline}
\[
f_{\left(2,1\right)}
\]
When the option variable {\tt tex\_uses\_named\_subscripts\_for\_derivatives}
(default false) is true, a derivative with respect to the i-th argument is
indicated by a subscript that is the i-th element of the option variable
{\tt tex\_diff\_var\_names}. An example is the clearest way to
describe this.
\begin{mcline}{c65}
tex_uses_named_subscripts_for_derivatives : true$
\end{mcline}
\begin{mcline}{c66}
tex_diff_var_names;
\end{mcline}
\begin{mdline}{d66}
\left[ x,y,z \right]
\end{mdline}
\begin{mcline}{c67}
tex([pderivop(f,1,0), pderivop(f,0,1), pderivop(f,1,1), pderivop(f,2,0)]);
\end{mcline}
$$\left[ f_{x},f_{y},f_{xy},f_{xx} \right] $$
\begin{mcline}{c68}
tex_diff_var_names : [a,b];
\end{mcline}
\begin{mdline}{d68}
\left[ a,b \right]
\end{mdline}
\begin{mcline}{c69}
tex([pderivop(f,1,0), pderivop(f,0,1), pderivop(f,1,1), pderivop(f,2,0)]);
\end{mcline}
$$\left[ f_{a},f_{b},f_{ab},f_{aa} \right] $$
\begin{mcline}{c70}
tex_diff_var_names : [x,y,z];
\end{mcline}
\begin{mdline}{d70}
\left[ x,y,z \right]
\end{mdline}
\begin{mcline}{c71}
tex([diff(f(x,y),x), diff(f(y,x),y)]);
\end{mcline}
$$\left[ f_{x}(x,y),f_{x}(y,x) \right] $$
When the derivative order exceeds {tt tex\_prime\_limit}, revert to the default
method for converting to \TeX{}
\begin{mcline}{c72}
tex(diff(f(x,y,z),x,1,y,1,z,1)), tex_prime_limit : 4$
\end{mcline}
\[
f_{xyz}(x,y,z)
\]
\begin{mcline}{c73}
tex(diff(f(x,y,z),x,1,y,1,z,1)), tex_prime_limit : 1$
\end{mcline}
$$f_{\left(1,1,1\right)}(x,y,z)$$
\subsection*{A longer example}
We'll use the positional derivative package to change the independent
variable of the differential equation
\begin{mcline}{c74}
de : 4*x^2*'diff(y,x,2) + 4*x*'diff(y,x,1) + (x-1)*y = 0;
\end{mcline}
\begin{mdline}{d74}
4\,x^2\,\left({{d^2}\over{d\,x^2}}\,y\right)+4\,x\,\left({{d
}\over{d\,x}}\,y\right)+\left(x-1\right)\,y=0
\end{mdline}
With malice aforethought, we'll assume a solution of the form
$ y = g(x^n)$, where $n$ is a number. Substituting $y \rightarrow g(x^n)$
in the differential equation gives
\begin{mcline}{c75}
de : subst(g(x^n),y,de);
\end{mcline}
\begin{mdline}{d75}
4\,x^2\,\left({{d^2}\over{d\,x^2}}\,g\left(x^{n}\right)\right)+4\,
x\,\left({{d}\over{d\,x}}\,g\left(x^{n}\right)\right)+\left(x-1
\right)\,g\left(x^{n}\right)=0
\end{mdline}
\begin{mcline}{c76}
de : ev(de, diff);
\end{mcline}
\begin{mdline}{d76}
4\,x^2\,\left(n^2\,x^{2\,n-2}\,g^{\prime\prime}(x^{n})+\left(n-1
\right)\,n\,x^{n-2}\,g^{\prime}(x^{n})\right)+4\,n\,x^{n}\,g^{\prime
}(x^{n})+\left(x-1\right)\,g\left(x^{n}\right)=0
\end{mdline}
Now let $x \rightarrow t^{1/n}$
\begin{mcline}{c77}
de : radcan(subst(x^(1/n),x, de));
\end{mcline}
\begin{mdline}{d77}
4\,n^2\,x^2\,g^{\prime\prime}(x)+4\,n^2\,x\,g^{\prime}(x)+\left(x
^{{{1}\over{n}}}-1\right)\,g\left(x\right)=0
\end{mdline}
Setting $n \rightarrow 1/2$, we recognize that $g$ is the order 1 Bessel
equation
\begin{mcline}{c78}
subst(1/2,n, de);
\end{mcline}
\begin{mdline}{d78}
x^2\,g^{\prime\prime}(x)+x\,g^{\prime}(x)+\left(x^2-1\right)\,g
\left(x\right)=0
\end{mdline}
\subsection*{Limitations}
\begin{itemize}
\item Positional derivatives of subscripted functions are not allowed.
\item Derivatives of unknown functions with symbolic orders are not
computed positionally.
\item The {\tt pdiff.lisp} code alters the Maxima functions {\tt mqapply}
and {\tt sdiffgrad} Although I'm unaware of any problems associated
with these altered functions, there may be some. Setting {\tt use\_pdiff} to
false should restore {\tt mqapply} and {\tt sdiffgrad} to their
original functioning.
\end{itemize}
\subsection*{Conclusion}
The {\tt pdiff} package provides a simple way of working with
derivatives of unknown functions. If you find a bug in the package,
or if you have a comment or a question, please send it to
{\tt willisb@unk.edu}.
The {\tt pdiff} package could serve as a basis for a Maxima package
differential and integral operators.
\end{document}
|