Mathematica evaluates the derivative of most complicated functions within a fraction of second. But while doing analysis sometimes we might be in a situation to differentiate or integrate a function with respect to some "ax" instead of "x" so in these cases is it possible to find the derivative of the function with respect to "ax" where "a" is a constant. For instance the fractional operators have the scaling property that:

$\frac{d^q f(ax)}{dx^q} = a^q \left(\frac{d^qf(ax)}{d(ax)^q}\right)$

  • 2
    $\begingroup$ It would help if you could supply a simple example of a function you want to take the derivative of, and what the expected output is. $\endgroup$
    – bill s
    Aug 14, 2019 at 4:09
  • $\begingroup$ I modified your example to try and make it easier to read. If you feel I changed the meaning of your question, please feel free to edit it again. $\endgroup$
    – eyorble
    Aug 14, 2019 at 4:23

1 Answer 1


Half of this problem can be solved by using Dt. Dt calculates total derivatives, and ratios between total derivatives are derivatives in terms of functions. As a simple example, compare derivation by substitution of Cosh[(a x^2+b)^2] by (a x^2+b):

D[Cosh[u^2], u] /. u -> a x^2 + b

2 (b + a x^2) Sinh[(b + a x^2)^2]

This should be an unsurprising result.

With Dt, however, this computation can be performed equivalently by:

Dt[Cosh[(a x^2 + b)^2], Constants -> {a, b}]/Dt[a x^2 + b, Constants -> {a, b}]

2 (b + a x^2) Sinh[(b + a x^2)^2]

Simply by changing the bottom ratio, the derivative by Dt[a x, Constants -> {a, b}] can also be found. That is left as an exercise to the reader.

Unfortunately, for integration, this is rather more difficult. There is no corresponding concept of a "total antiderivative". However, DSolve can handle some expressions with Dt, and may be able to help integrate them.

The main limitation with DSolve in this respect is that it requires the declaration of a dependent and independent variable, and the dependent variable can only depend on the independent variable explicitly. The typical formula for such an integration is something like:

DSolve[g'[x] == Dt[f[a x],Constants->a]/Dt[a x, Constants->a], g, x]

{{g -> Function[{x}, C[1] + f[a x]/a}}

While this example is obviously no different than DSolve[g'[x] == f'[a x], g, x], for more complex expressions it can be a simpler way to write the question:

DSolve[g'[x] == Dt[f[a x],Constants->a]/Dt[a x^2, Constants->a], g, x]

{{g -> Function[{x}, C[1] + Integrate[f'[a K[1]]/(2 K[1]), {K[1], 1, x}]}}

Even so, the answer may be more complex than initially anticipated. The K[1] here is an automatically generated variable created by DSolve used up in the integration.

  • 1
    $\begingroup$ "That is left as an exercise to the reader." This is not a textbook. $\endgroup$
    – ciao
    Aug 14, 2019 at 7:54
  • $\begingroup$ @ciao Apologies for that, but due to the comparative complexity of the issue and limited time when I first wrote this answer, I figured a partial answer could be of more use than no answer at all. My intention was primarily to provide at least a hint as to the direction that could be taken. I have provided some examples now. $\endgroup$
    – eyorble
    Aug 14, 2019 at 14:49

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.