{
  "id": "logarithmic-differentiation",
  "version": "8d112d72cb56",
  "status": "published",
  "name": "Logarithmic Differentiation Calculator",
  "question": "Logarithmic differentiation of y = f(x)",
  "summary": "Differentiates y = f(x) by taking ln of both sides: ln y, y′/y and dy/dx, checked numerically.",
  "category": "math",
  "subcategory": "calculus",
  "url": "https://www.acalculator.org/math/logarithmic-differentiation-calculator",
  "markdown": "https://www.acalculator.org/math/logarithmic-differentiation-calculator.md",
  "kind": "function",
  "method": "ln y = ln f(x), expanded by the logarithm laws, then y′/y = d/dx ln y and dy/dx = y · (y′/y). A computer algebra system differentiates; the answer is checked against a difference quotient.",
  "assumptions": [
    "The variable is x; angles are in radians; ln is the natural logarithm.",
    "An answer that fails its check is not shown."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "f": {
        "title": "y = f(x)",
        "description": "A product, quotient or power of functions of x, typed like x^x or (x^2 + 1)^3 (x - 2)^4.",
        "type": "string",
        "maxLength": 200
      }
    }
  },
  "outputs": {
    "derivative": {
      "label": "dy/dx",
      "description": "The derivative, written as y times the derivative of ln y.",
      "format": "math"
    },
    "lny": {
      "label": "ln y =",
      "description": "ln of both sides, with the logarithm laws applied.",
      "format": "math"
    },
    "dlog": {
      "label": "y′/y =",
      "description": "The derivative of ln y.",
      "format": "math"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "f": "x^x"
    },
    "outputs": {
      "derivative": "x^x (1 + ln(x))",
      "lny": "x ln|x|",
      "dlog": "1 + ln(x)"
    },
    "text": "By logarithmic differentiation, the derivative of y = x^x is x^x (1 + ln(x))."
  },
  "examples": [
    {
      "given": {
        "f": "(2x^4 + 1)^(tan(x))"
      },
      "expect": {
        "dlog": "8x^3 tan(x)/(1 + 2x^4) + ln(1 + 2x^4) sec(x)^2"
      },
      "source": "OpenStax, Calculus Volume 1, section 3.9 Derivatives of Exponential and Logarithmic Functions, Example 3.81. https://openstax.org/books/calculus-volume-1/pages/3-9-derivatives-of-exponential-and-logarithmic-functions"
    },
    {
      "given": {
        "f": "x sqrt(2x + 1)/(e^x sin(x)^3)"
      },
      "expect": {
        "dlog": "1/(1 + 2x) - 1 - 3 cos(x)/sin(x) + 1/x"
      },
      "source": "OpenStax, Calculus Volume 1, section 3.9 Derivatives of Exponential and Logarithmic Functions, Example 3.82"
    }
  ],
  "sources": [
    "OpenStax, Calculus Volume 1, section 3.9 Derivatives of Exponential and Logarithmic Functions: https://openstax.org/books/calculus-volume-1/pages/3-9-derivatives-of-exponential-and-logarithmic-functions"
  ],
  "related": [
    "tangent-line",
    "instantaneous-rate-of-change",
    "integral",
    "log"
  ],
  "changelog": []
}
