fdiff - Maple Help

fdiff

compute a numerical approximation for the (partial) derivative of an expression evaluated at a point

 Calling Sequence fdiff( f(x), x=a, prec ) fdiff( f(x), x, x=a, prec ) fdiff( f(x,y,...), [x=a, y=b, ...], prec ) fdiff( f(x,y,...), [x, y, ...], [x=a, y=b, ...], prec ) fdiff( g, [1, 2, ...], [a, b, ...], prec )

Parameters

 f(x) - algebraic expression depending on x f(x, y, ...) - algebraic expression depending on x, y, ... x, y, ... - names of the differentiation variables a, b, ... - constants g - procedure or operator prec - (optional) equation of the form workprec = $n$, where $n$ is a numerical constant > 1; working precision

Description

 • The expression fdiff(sin(x), x=1) computes a numerical approximation to sin'(1) = cos(1) without using a formula for diff(sin(x),x). It does this by evaluating f at two points near $x=1$. More generally, the command fdiff(f(x,y,z),[x,x,y],[x=a,y=b,z=c] computes a numerical approximation for the partial derivative diff(f(x,y,z), x,x,y) evaluated at $\left\{x=a,y=b,z=c\right\}$. The differentiation is not performed symbolically, and the computation of this approximation assumes only that f can be evaluated numerically to high precision near the point $x=a,y=b,z=c$.
 The fdiff command is useful when a closed form formula is not known for $f'\left(x\right)$, thus for instance, permitting the plotting of expressions containing such derivatives. The accuracy of the approximation is determined by the global variable Digits and the optional argument workprec which is described in the Computational Approach section following. The algorithm used will normally, but not necessarily, output a result accurate to Digits precision.
 • The first argument passed to fdiff is the expression being differentiated. The second argument can be a set or a list of the differentiation variables. It specifies the order of the derivative.  The third argument can be set or a list with equations containing the differentiation variables on the left-hand sides and the evaluation points on the right-hand sides.  It specifies the point at which the derivative is computed.  For example,

$\mathrm{fdiff}\left(f\left(x,y\right),\left[x,x,y\right],\left\{x=a,y=b\right\}\right)=\genfrac{}{}{0}{}{\left(\frac{{\partial }^{3}}{\partial {x}^{2}\partial y}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}f\left(x,y\right)\right)}{\phantom{\left\{x=a,y=b\right\}}}|\genfrac{}{}{0}{}{\phantom{\left(\frac{{\partial }^{3}}{\partial {x}^{2}\partial y}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}f\left(x,y\right)\right)}}{\left\{x=a,y=b\right\}}$

 Note: The order of the derivative is always equal to the number of elements in the second argument, and the equations in the third argument should assure that all the names in the expression being differentiated get a value, and the evaluation points ($a,b$ in the above) should be numerical constants so that numerical differentiation can be performed. If the numerical derivative cannot be computed, fdiff returns unevaluated.
 • The right-hand side in the correspondence above can also be entered as an argument to evalf, for example,

$\mathrm{evalf}\left(\genfrac{}{}{0}{}{\left(\frac{{\partial }^{3}}{\partial {x}^{2}\partial y}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}f\left(x,y\right)\right)}{\phantom{\left\{x=a,y=b\right\}}}|\genfrac{}{}{0}{}{\phantom{\left(\frac{{\partial }^{3}}{\partial {x}^{2}\partial y}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}f\left(x,y\right)\right)}}{\left\{x=a,y=b\right\}}\right)$

 in which case it is (internally) transformed into the corresponding call to fdiff, then numerically evaluated. The argument to evalf can also involve Eval instead of eval and Diff instead of diff.
 Alternatively, the following shorter syntax can be used:

$\mathrm{evalf}\left({\mathrm{D}}_{1,1,2}\left(f\right)\left(a,b\right)\right)$

 • For simplicity, an alternative syntax is allowed: the second argument, $\left[x,y\right]$ in fdiff( f(x,y), [x,y], {x=a, y=b}) can be omitted, in which case the third argument, $\left\{x=a,y=b\right\}$ indicates, simultaneously, the differentiations to be performed and the evaluation points. For example, these two calls result in the same output

$\mathrm{fdiff}\left(f\left(x,y\right),\left[x,y\right],\left\{x=a,y=b\right\}\right)=\mathrm{fdiff}\left(f\left(x,y\right),\left\{x=a,y=b\right\}\right)$

 Note: In the right-hand side, every equation entering the second argument implies a differentiation.
 • When the expression being differentiated depends on one variable only, or the computation is a first derivative, the second or third arguments can also be given without enclosing them as sets or lists, for example,

$\mathrm{fdiff}\left(f\left(x\right),x=a\right)$;

$\mathrm{fdiff}\left(f\left(x\right),x,x=a\right)$;

$\mathrm{fdiff}\left(f\left(x,y,z\right),x,\left\{x=a,y=b,z=c\right\}\right)$;

 • The expression being differentiated can also be a procedure or operator, which is a function of one or more inputs. This is useful when a function cannot be expressed as a formula and also when a program would be a more efficient representation of a function than a formula. In this case, the differentiation variables are specified in the second argument as a list with their numeric positions (see D), and the third argument to fdiff should be a list with the constant values corresponding to each (dummy) variable in the procedure. So, for instance, the correspondence is as in

$\mathrm{fdiff}\left(f,\left[1,2,2\right],\left[a,b\right]\right)={\mathrm{D}}_{1,2,2}\left(f\right)\left(a,b\right)$

Computational Approach

 The method used is a fixed point method.  That is, for a given order of derivative, the function f is evaluated at a fixed number of points near the evaluation point $x=a,y=b,\dots$ at sufficient precision so that all digits in the output are accurate. However, if the function is changing rapidly near the evaluation point, the result may be inaccurate. The optional argument workprec=n where $n$ is a numerical constant > 1 means that the computation will be computed at a working precision of n*Digits precision and the result rounded to Digits precision. The default value for workprec is 1.
 The following describes how the differentiation is performed numerically to compute D(f)(a). The Taylor series for $f\left(x+h\right)$ and $f\left(x-h\right)$ about $h=0$ are

$f\left(x+h\right)=f\left(x\right)+hf\text{'}\left(x\right)+\frac{{h}^{2}f\mathrm{\text{'}\text{'}}\left(x\right)}{2}+\frac{{h}^{3}f\mathrm{\text{'}\text{'}\text{'}}\left(x\right)}{6}+\frac{{h}^{4}f\mathrm{\text{'}\text{'}\text{'}\text{'}}\left(x\right)}{24}+\mathrm{...}\left(1\right)$

$f\left(x-h\right)=f\left(x\right)-hf\text{'}\left(x\right)+\frac{{h}^{2}f\mathrm{\text{'}\text{'}}\left(x\right)}{2}-\frac{{h}^{3}f\mathrm{\text{'}\text{'}\text{'}}\left(x\right)}{6}+\frac{{h}^{4}f\mathrm{\text{'}\text{'}\text{'}\text{'}}\left(x\right)}{24}+\mathrm{...}\left(2\right)$

 To estimate $f'\left(x\right)$, solve either of the above for $f'\left(x\right)$, giving a one-sided difference formula, for example, $f\text{'}\left(x\right)=\frac{f\left(x+h\right)-f\left(x\right)}{h}-\frac{h}{2}\cdot f\text{'}\text{'}\left(x\right)+\dots$ with error term $\frac{h}{2}f\text{'}\text{'}\left(x\right)+\mathrm{...}=\mathrm{O}\left(h\right)$ and requiring two function evaluations. Instead, fdiff uses a symmetric difference, taking (1) - (2) to obtain

 $f\text{'}\left(x\right)=\frac{f\left(x+h\right)-f\left(x-h\right)}{2h}-\frac{{h}^{2}f\mathrm{\text{'}\text{'}\text{'}}\left(x\right)}{6}+\mathrm{...}$ ( * )

 which also requires two function evaluations but has an error term $\frac{{h}^{2}}{6}f\text{'}\text{'}\text{'}\left(x\right)+\mathrm{...}$, which is $\mathrm{O}\left({h}^{2}\right)$.
 Let $n=\mathrm{Digits}$ and $e={10}^{-n}$, that is, $e$ is a machine epsilon.
 To compute $f'\left(x\right)$ accurate to $n$ digits, take $h={10}^{-\frac{n}{2}}=\sqrt{e}$ in ( * ). Thus the $\mathrm{error}=\frac{{h}^{2}}{6}f\text{'}\text{'}\text{'}\left(x\right)+\mathrm{...}=\mathrm{O}\left({h}^{2}\right)=\mathrm{O}\left({10}^{-n}\right)=\mathrm{O}\left(e\right)$. Note that $\frac{f\left(x+\frac{h}{2}\right)-f\left(x-\frac{h}{2}\right)}{h}$ loses $\frac{n}{2}$ digits of precision. Hence, to obtain the difference with $n$ digits of precision, fdiff must compute $f\left(x+\frac{h}{2}\right)$ and $f\left(x-\frac{h}{2}\right)$ to at least $\frac{3n}{2}$ digits of precision. The actual values for the precision used by fdiff to compute the linear combination of the $f$'s allow for two guard digits.
 For the second derivative, $f\text{'}\text{'}\left(x\right)$, solving (1) + (2) for $f\text{'}\text{'}\left(x\right)$ one has

$f\mathrm{\text{'}\text{'}}\left(x\right)=\frac{f\left(x+h\right)-2f\left(x\right)+f\left(x-h\right)}{{h}^{2}}-\frac{{h}^{2}f\mathrm{\text{'}\text{'}\text{'}\text{'}}\left(x\right)}{12}+\mathrm{...}$

 with error term $\mathrm{O}\left({h}^{2}\right)$ but requiring three function calls. Setting $h={10}^{-\frac{n}{2}}$, the $\mathrm{error}=\frac{{h}^{2}}{12}f\text{'}\text{'}\text{'}\text{'}\left(x\right)+\mathrm{...}=\mathrm{O}\left({h}^{2}\right)={10}^{-n}$.
 For higher order derivatives one may locate the evaluation points symmetrically and equally spaced about $x$, namely, for even order derivatives, at $\mathrm{...},x-2h,x-h,x,x+h,x+2h,\mathrm{...}$, and for odd order derivatives, at $\mathrm{...},x-\frac{3h}{2},x-\frac{h}{2},x+\frac{h}{2},x+\frac{3h}{2},\mathrm{...}$ leading to an error term $\mathrm{O}\left({h}^{2}\right)$.

Examples

Compute $\mathrm{cos}'\left(1\right)$ numerically without using $\mathrm{cos}'\left(x\right)=-\mathrm{sin}\left(x\right)$.

 > $\mathrm{fdiff}\left(\mathrm{cos}\left(x\right),x=1\right)$
 ${-0.8414709848}$ (1)

Compare with the result obtained by first computing that formula:

 > $\mathrm{diff}\left(\mathrm{cos}\left(x\right),x\right)$
 ${-}{\mathrm{sin}}{}\left({x}\right)$ (2)
 > $\mathrm{evalf}\left(\mathrm{eval}\left(,x=1\right)\right)$
 ${-0.8414709848}$ (3)

An example where there is no closed formula for the derivative.

 > $\mathrm{fdiff}\left(\mathrm{BesselJ}\left(a,\frac{1}{2}\right),a=\frac{1}{3}\right)=\mathrm{eval}\left(\mathrm{diff}\left(\mathrm{BesselJ}\left(a,\frac{1}{2}\right),a\right),a=\frac{1}{3}\right)$
 ${-0.8196217810}{=}\genfrac{}{}{0}{}{\left(\frac{{ⅆ}}{{ⅆ}{a}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselJ}}{}\left({a}{,}\frac{{1}}{{2}}\right)\right)}{\phantom{\left\{{a}{=}\frac{{1}}{{3}}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{ⅆ}}{{ⅆ}{a}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselJ}}{}\left({a}{,}\frac{{1}}{{2}}\right)\right)}}{\left\{{a}{=}\frac{{1}}{{3}}\right\}}$ (4)

Constructions like the right-hand side in the above can be evaluated numerically by passing them as arguments to evalf; they are internally translated into the corresponding call to fdiff (see the previous input line) and computed.

 > $z≔\mathrm{eval}\left(\mathrm{diff}\left(\mathrm{BesselJ}\left(a,\frac{1}{2}\right),a\right),a=\frac{1}{3}\right)$
 ${z}{≔}\genfrac{}{}{0}{}{\left(\frac{{ⅆ}}{{ⅆ}{a}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselJ}}{}\left({a}{,}\frac{{1}}{{2}}\right)\right)}{\phantom{\left\{{a}{=}\frac{{1}}{{3}}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{ⅆ}}{{ⅆ}{a}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselJ}}{}\left({a}{,}\frac{{1}}{{2}}\right)\right)}}{\left\{{a}{=}\frac{{1}}{{3}}\right\}}$ (5)
 > $\mathrm{evalf}\left(z\right)$
 ${-0.8196217810}$ (6)
 > $\mathrm{evalf}\left(\mathrm{D}\left[1\right]\left(\mathrm{BesselJ}\right)\left(\frac{1}{3},\frac{1}{2}\right)\right)$
 ${-0.8196217810}$ (7)

You can also use Eval instead of eval and Diff instead of diff, with any combination of them resulting in the same output.

 > $z≔\mathrm{Eval}\left(\mathrm{Diff}\left(\mathrm{BesselJ}\left(a,\frac{1}{2}\right),a\right),a=\frac{1}{3}\right)$
 ${z}{≔}\genfrac{}{}{0}{}{\frac{{ⅆ}}{{ⅆ}{a}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselJ}}{}\left({a}{,}\frac{{1}}{{2}}\right)}{\phantom{{a}{=}\frac{{1}}{{3}}}}{|}\genfrac{}{}{0}{}{\phantom{\frac{{ⅆ}}{{ⅆ}{a}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselJ}}{}\left({a}{,}\frac{{1}}{{2}}\right)}}{{a}{=}\frac{{1}}{{3}}}$ (8)
 > $\mathrm{evalf}\left(z\right)$
 ${-0.8196217810}$ (9)

An example with another special function, LegendreP, and a fourth order derivative with respect to two of its parameters (again, the derivative cannot be performed symbolically)

 > $\mathrm{eval}\left(\mathrm{diff}\left(\mathrm{LegendreP}\left(a,b,x\right),a,a,b,b\right),\left[a=\frac{1}{2},b=\frac{3}{2},x=\frac{5}{7}\right]\right)=\mathrm{fdiff}\left(\mathrm{LegendreP}\left(a,b,x\right),\left[a,a,b,b\right],\left[a=\frac{1}{2},b=\frac{3}{2},x=\frac{7}{5}\right]\right)$
 $\genfrac{}{}{0}{}{\left(\frac{{{\partial }}^{{4}}}{{\partial }{{a}}^{{2}}{\partial }{{b}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{LegendreP}}{}\left({a}{,}{b}{,}\frac{{5}}{{7}}\right)\right)}{\phantom{\left\{{a}{=}\frac{{1}}{{2}}{,}{b}{=}\frac{{3}}{{2}}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{{\partial }}^{{4}}}{{\partial }{{a}}^{{2}}{\partial }{{b}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{LegendreP}}{}\left({a}{,}{b}{,}\frac{{5}}{{7}}\right)\right)}}{\left\{{a}{=}\frac{{1}}{{2}}{,}{b}{=}\frac{{3}}{{2}}\right\}}{=}{-3.553866479}$ (10)

The operational syntax (see D) for this fourth derivative of LegendreP:

 > $\mathrm{D}\left[1,1,2,2\right]\left(\mathrm{LegendreP}\right)\left(\frac{1}{2},\frac{3}{2},\frac{7}{5}\right)=\mathrm{fdiff}\left(\mathrm{LegendreP},\left[1,1,2,2\right],\left[\frac{1}{2},\frac{3}{2},\frac{7}{5}\right]\right)$
 ${{\mathrm{D}}}_{{1}{,}{1}{,}{2}{,}{2}}{}\left({\mathrm{LegendreP}}\right){}\left(\frac{{1}}{{2}}{,}\frac{{3}}{{2}}{,}\frac{{7}}{{5}}\right){=}{-3.553866479}$ (11)

This is an example where the function is input as a (recursive) program. The following Maple procedure computes ${f}^{\left(n\right)}\left(x\right)$ where $f$ is the logistic function $f\left(x\right)=ax\left(1-x\right)$ with parameter $a$.

 > g := proc(x,a,n::integer) local y;         if n=0 then x else y := g(x,a,n-1); a*y*(1-y) end if;      end proc:
 > $g\left(x,a,3\right)$
 ${{a}}^{{3}}{}{x}{}\left({1}{-}{x}\right){}\left({1}{-}{a}{}{x}{}\left({1}{-}{x}\right)\right){}\left({1}{-}{{a}}^{{2}}{}{x}{}\left({1}{-}{x}\right){}\left({1}{-}{a}{}{x}{}\left({1}{-}{x}\right)\right)\right)$ (12)
 > $\mathrm{degree}\left(g\left(x,a,3\right),x\right),\mathrm{degree}\left(g\left(x,a,3\right),a\right)$
 ${8}{,}{7}$ (13)
 > $\mathrm{degree}\left(g\left(x,a,4\right),x\right),\mathrm{degree}\left(g\left(x,a,4\right),a\right)$
 ${16}{,}{15}$ (14)
 > $\mathrm{degree}\left(g\left(x,a,5\right),x\right),\mathrm{degree}\left(g\left(x,a,5\right),a\right)$
 ${32}{,}{31}$ (15)

Compute the derivative diff(g(x,a,5),x,a) at $x=\frac{1}{3},a=\frac{1}{2}$.

 > $\mathrm{D}\left[2\right]\left(g\right)\left(\frac{1}{3},\frac{1}{2},5\right)=\mathrm{fdiff}\left(g,\left[1,2\right],\left[\frac{1}{3},\frac{1}{2},5\right]\right)$
 ${{\mathrm{D}}}_{{2}}{}\left({g}\right){}\left(\frac{{1}}{{3}}{,}\frac{{1}}{{2}}{,}{5}\right){=}{0.05826998816}$ (16)

The following is an example where the result of fdiff is inaccurate.

 > $f≔9000{x}^{5}+1$
 ${f}{≔}{9000}{}{{x}}^{{5}}{+}{1}$ (17)
 > $a≔\frac{500000000}{3}$
 ${a}{≔}\frac{{500000000}}{{3}}$ (18)
 > $\mathrm{answer}≔\mathrm{evalf}\left[20\right]\left(\mathrm{eval}\left(\mathrm{diff}\left(f,x\right),x=a\right)\right)$
 ${\mathrm{answer}}{≔}{3.4722222222222222222}{×}{{10}}^{{37}}$ (19)
 > $\mathrm{fdiff}\left(f,x=a\right)$
 ${3.47200000}{×}{{10}}^{{37}}$ (20)

The workprec option can be used to increase the working precision used to obtain a more accurate result.

Increase Digits by 10% (1 digit).

 > $\mathrm{fdiff}\left(f,x=a,\mathrm{workprec}=1.1\right)$
 ${3.472220000}{×}{{10}}^{{37}}$ (21)

Increase Digits by 30% (3 digits).

 > $\mathrm{fdiff}\left(f,x=a,\mathrm{workprec}=1.3\right)$
 ${3.472222200}{×}{{10}}^{{37}}$ (22)

Increase Digits by 50% (5 digits).

 > $\mathrm{fdiff}\left(f,x=a,\mathrm{workprec}=1.5\right)$
 ${3.472222222}{×}{{10}}^{{37}}$ (23)

The modified Bessel function of the second kind, BesselK, and a visual comparison between its derivative with respect to the first parameter and the series expansion of it. The visualization is obtained using the plotcompare command.

 > $a≔'a':$
 > $f≔\mathrm{diff}\left(\mathrm{BesselK}\left(a,\frac{3}{5}\right),a\right):$

The series with respect to a.

 > $f=\mathrm{convert}\left(\mathrm{series}\left(f,a\right),\mathrm{compose},\mathrm{diff},\mathrm{polynom}\right)$
 $\frac{{ⅆ}}{{ⅆ}{a}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselK}}{}\left({a}{,}\frac{{3}}{{5}}\right){=}\genfrac{}{}{0}{}{\left(\frac{{ⅆ}}{{ⅆ}{\mathrm{t1}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselK}}{}\left({\mathrm{t1}}{,}\frac{{3}}{{5}}\right)\right)}{\phantom{\left\{{\mathrm{t1}}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{ⅆ}}{{ⅆ}{\mathrm{t1}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselK}}{}\left({\mathrm{t1}}{,}\frac{{3}}{{5}}\right)\right)}}{\left\{{\mathrm{t1}}{=}{0}\right\}}{+}\left(\genfrac{}{}{0}{}{\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{\mathrm{t1}}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselK}}{}\left({\mathrm{t1}}{,}\frac{{3}}{{5}}\right)\right)}{\phantom{\left\{{\mathrm{t1}}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{\mathrm{t1}}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselK}}{}\left({\mathrm{t1}}{,}\frac{{3}}{{5}}\right)\right)}}{\left\{{\mathrm{t1}}{=}{0}\right\}}\right){}{a}{+}\frac{\left(\genfrac{}{}{0}{}{\left(\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{\mathrm{t1}}}^{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselK}}{}\left({\mathrm{t1}}{,}\frac{{3}}{{5}}\right)\right)}{\phantom{\left\{{\mathrm{t1}}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{\mathrm{t1}}}^{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselK}}{}\left({\mathrm{t1}}{,}\frac{{3}}{{5}}\right)\right)}}{\left\{{\mathrm{t1}}{=}{0}\right\}}\right){}{{a}}^{{2}}}{{2}}{+}\frac{\left(\genfrac{}{}{0}{}{\left(\frac{{{ⅆ}}^{{4}}}{{ⅆ}{{\mathrm{t1}}}^{{4}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselK}}{}\left({\mathrm{t1}}{,}\frac{{3}}{{5}}\right)\right)}{\phantom{\left\{{\mathrm{t1}}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{{ⅆ}}^{{4}}}{{ⅆ}{{\mathrm{t1}}}^{{4}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselK}}{}\left({\mathrm{t1}}{,}\frac{{3}}{{5}}\right)\right)}}{\left\{{\mathrm{t1}}{=}{0}\right\}}\right){}{{a}}^{{3}}}{{6}}{+}\frac{\left(\genfrac{}{}{0}{}{\left(\frac{{{ⅆ}}^{{5}}}{{ⅆ}{{\mathrm{t1}}}^{{5}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselK}}{}\left({\mathrm{t1}}{,}\frac{{3}}{{5}}\right)\right)}{\phantom{\left\{{\mathrm{t1}}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{{ⅆ}}^{{5}}}{{ⅆ}{{\mathrm{t1}}}^{{5}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselK}}{}\left({\mathrm{t1}}{,}\frac{{3}}{{5}}\right)\right)}}{\left\{{\mathrm{t1}}{=}{0}\right\}}\right){}{{a}}^{{4}}}{{24}}{+}\frac{\left(\genfrac{}{}{0}{}{\left(\frac{{{ⅆ}}^{{6}}}{{ⅆ}{{\mathrm{t1}}}^{{6}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselK}}{}\left({\mathrm{t1}}{,}\frac{{3}}{{5}}\right)\right)}{\phantom{\left\{{\mathrm{t1}}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{{ⅆ}}^{{6}}}{{ⅆ}{{\mathrm{t1}}}^{{6}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{BesselK}}{}\left({\mathrm{t1}}{,}\frac{{3}}{{5}}\right)\right)}}{\left\{{\mathrm{t1}}{=}{0}\right\}}\right){}{{a}}^{{5}}}{{120}}$ (24)

The default ranges are: $x=-1..1$, $y=-1..1$.

 > $\mathrm{plots}\left[\mathrm{plotcompare}\right]\left(\right)$