3
$\begingroup$

In the study https://link.springer.com/article/10.1007/s00025-018-0783-z, in Eq. (5), the author defines the $(p,q)-$derivative as $$ D_{p, q} f(x)=\frac{f(p x)-f(q x)}{(p-q) x}, \quad x \neq 0. $$ In the equations (10) and (11), the author defines the $(p,q)-$product rule as $$ \begin{aligned} &D_{p, q}(f(x) g(x))=f(p x) D_{p, q} g(x)+g(q x) D_{p, q} f(x), \\ &D_{p, q}(f(x) g(x))=g(p x) D_{p, q} f(x)+f(q x) D_{p, q} g(x) . \end{aligned} $$ Also, in Eq. (12) and (13), the $(p,q)-$quotient rule is defined by $$ \begin{aligned} &D_{p, q}\left(\frac{f(x)}{g(x)}\right)=\frac{g(q x) D_{p, q} f(x)-f(q x) D_{p, q} g(x)}{g(p x) g(q x)} \\ &D_{p, q}\left(\frac{f(x)}{g(x)}\right)=\frac{g(p x) D_{p, q} f(x)-f(p x) D_{p, q} g(x)}{g(p x) g(q x)} \end{aligned} $$

Using the classical derivative techniques, we can easily obtain the derivative of some functions such as $e^x, sin(x), \frac{1}{x}$ etc.

My problem is that: I want to calculate the $(p,q)-$derivative of a function or more functions in MATHEMATICA. According to the study https://www.tandfonline.com/doi/abs/10.1080/10652469408819035,

$$ \begin{aligned} D_{p q} x^n &=[n]_{p q} x^{n-1} \\ D_{p q} \exp _{p q}(a x) &=a \exp _{p q}(a x) , \end{aligned} $$ where $$[n]_{p, q}=\frac{p^n-q^n}{p-q} \qquad \text{and} \qquad \exp _{p q} x=\sum_{n=0}^{\infty} \frac{x^n}{[n]_{p q} !}.$$

How can I define $(p,q)$-derivative in MATHEMATICA? How can I calculate the $(p,q)$-product or quotient derivative of two or more functions?

Thank you very much.

$\endgroup$

1 Answer 1

8
$\begingroup$

Here's something to get you started:

Dpq[p_, q_, f_][x_] := (f[p x] - f[q x])/((p - q) x)

This defines a function Dpq that implements the definition of the $(p,q)$-derivative exactly as you posted it. We can now verify the product rules:

Dpq[p, q, f[#] g[#] &][x] == f[p x] Dpq[p, q, g][x] + g[q x] Dpq[p, q, f][x] // FullSimplify
(* True *)

Dpq[p, q, f[#] g[#] &][x] == g[p x] Dpq[p, q, f][x] + f[q x] Dpq[p, q, g][x] // FullSimplify
(* True *)

The quotient rules can similarly be checked:

Dpq[p, q, f[#]/g[#] &][x] == (g[q x] Dpq[p, q, f][x] - f[q x] Dpq[p, q, g][x])/
  (g[p x] g[q x]) // FullSimplify
(* True *)

Dpq[p, q, f[#]/g[#] &][x] == (g[p x] Dpq[p, q, f][x] - f[p x] Dpq[p, q, g][x])/
  (g[p x] g[q x]) // FullSimplify
(* True *)

As a final example, this is how you could verify the derivative of $x^n$:

bracket[n_, p_, q_] := (p^n - q^n)/(p - q)

Dpq[p, q, #^n &][x] == bracket[n, p, q] x^(n - 1) // 
 FullSimplify[#, n ∈ Integers] &
(* True *)

To apply this efficiently to arbitrary functions will require some more work. In particular, you'd probably have to add special rules to apply the product, quotient, etc. rules where appropriate. This is mostly meant as a starting point for your explorations.

$\endgroup$
3
  • $\begingroup$ Dear Lukas, thank you very much for your answer. I have computed $x^n$ with my primitive methods. Your codes are more sophisticated. But, I couldn't compute the $(p,q)-$derivative of $e_{p,q}^{x}$? Could you please try it? $\endgroup$
    – drxy
    Dec 1, 2022 at 12:30
  • $\begingroup$ Mathematica can't handle simplifications on infinite sums in many cases, at least not on its own. You'll probably have to verify the derivative rule semi-manually on your own, and then just add the relevant special case (together with the ones for products, quotients, ...) $\endgroup$
    – Lukas Lang
    Dec 2, 2022 at 11:55
  • $\begingroup$ Thank you very much for your informative comments. @Lukas $\endgroup$
    – drxy
    Dec 3, 2022 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.