Derivative of $\ln\left(\cos\left(x^{2}\right)\right)$

Differentiated with respect to x. Edit the function · Differentiation rules

Step-by-step solution

Input function
$$\ln\left(\cos\left(x^{2}\right)\right)$$

Start of the differentiation
$$\frac{d}{dx}{\left[\ln\left(\cos\left(x^{2}\right)\right)\right]}$$

Yellow: the expression being replaced. Green: its replacement.

Step 1 — Chain rule for the natural logarithm Differentiation rule
📖 Rule
$$\frac{d}{dx}\big(\ln({u})\big) = \frac{u'}{{u}}$$
With:
  • $u = \cos\left(x^{2}\right)$

Why: The outer derivative of the natural logarithm is the reciprocal of its argument. The chain rule adds the derivative of the argument in the numerator.

🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[\ln\left(\cos\left(x^{2}\right)\right)\right]}\,}}}$$
✨ After: Chain rule for the natural logarithm
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{\frac{d}{dx}{\left[\cos\left(x^{2}\right)\right]}}{\cos\left(x^{2}\right)}\,}}}$$
Step 2 — Derivative of Cosine (Chain Rule) Differentiation rule
📖 Rule
$$\frac{d}{dx}\cos\left(u\right)=-\sin\left(u\right)\cdot u'$$
With:
  • $u = x^{2}$

Why: Differentiate the outer function while keeping its inner argument u. Multiply by u' and evaluate that inner derivative in its own step.

Changed part: $\frac{d}{dx}{\left[\cos\left(x^{2}\right)\right]} \;\Longrightarrow\; -\sin\left(x^{2}\right)\,\frac{d}{dx}{\left[x^{2}\right]}$
🧮 Current expression
$$\frac{\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[\cos\left(x^{2}\right)\right]}\,}}}}{\cos\left(x^{2}\right)}$$
✨ After: Derivative of Cosine (Chain Rule)
$$\frac{\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,-\sin\left(x^{2}\right)\,\frac{d}{dx}{\left[x^{2}\right]}\,}}}}{\cos\left(x^{2}\right)}$$
Step 3 — Power Rule (special case) Differentiation rule
📖 Rule
$$\frac{d}{dx}\left(u^{c}\right)=c\,u^{c-1}$$
With:
  • $u = x$
  • $c = 2$

Why: Bring the current exponent down as a multiplier and subtract one from the exponent. Evaluate that small calculation in a separate step.

Changed part: $\frac{d}{dx}{\left[x^{2}\right]} \;\Longrightarrow\; 2\,x^{2 - 1}$
🧮 Current expression
$$\frac{-\sin\left(x^{2}\right)\,\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[x^{2}\right]}\,}}}}{\cos\left(x^{2}\right)}$$
✨ After: Power Rule (special case)
$$\frac{-\sin\left(x^{2}\right) \cdot \bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,2\,x^{2 - 1}\,}}}}{\cos\left(x^{2}\right)}$$
Step 4 — Evaluate numbers Simplification
📖 Rule

Why: Evaluate only the highlighted numeric expression, preserving exact fractions and decimals.

Changed part: $2 - 1 \;\Longrightarrow\; 1$
🧮 Current expression
$$\frac{-\sin\left(x^{2}\right) \cdot 2\,x^{\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,2 - 1\,}}}}}{\cos\left(x^{2}\right)}$$
✨ After: Evaluate numbers
$$\frac{-\sin\left(x^{2}\right) \cdot 2\,x^{\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,1\,}}}}}{\cos\left(x^{2}\right)}$$
Step 5 — Power with exponent one Simplification
📖 Rule
$$a^1=a$$

Why: An expression to the first power is the expression itself.

Changed part: $x^{1} \;\Longrightarrow\; x$
🧮 Current expression
$$\frac{-\sin\left(x^{2}\right) \cdot 2\,\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,x^{1}\,}}}}{\cos\left(x^{2}\right)}$$
✨ After: Power with exponent one
$$\frac{-\sin\left(x^{2}\right) \cdot 2\,\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,x\,}}}}{\cos\left(x^{2}\right)}$$
Step 6 — Order the factors Simplification
📖 Rule
$$u\cdot c=c\cdot u$$

Why: The order of factors may be changed (commutative law). Usual order: number, constants, powers of the variable, other factors.

Changed part: $-\sin\left(x^{2}\right) \cdot 2\,x \;\Longrightarrow\; -2\,x\,\sin\left(x^{2}\right)$
🧮 Current expression
$$\frac{\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,-\sin\left(x^{2}\right) \cdot 2\,x\,}}}}{\cos\left(x^{2}\right)}$$
✨ After: Order the factors
$$\frac{\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,-2\,x\,\sin\left(x^{2}\right)\,}}}}{\cos\left(x^{2}\right)}$$
Step 7 — Move the sign in front of the fraction Simplification
📖 Rule
$$\frac{-a}{b}=\frac{a}{-b}=-\frac{a}{b}$$

Why: A minus sign in the numerator or denominator can be written in front of the whole fraction. Two minus signs cancel.

🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{-2\,x\,\sin\left(x^{2}\right)}{\cos\left(x^{2}\right)}\,}}}$$
✨ After: Move the sign in front of the fraction
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,-\frac{2\,x\,\sin\left(x^{2}\right)}{\cos\left(x^{2}\right)}\,}}}$$
Final result
$$-\frac{2\,x\,\sin\left(x^{2}\right)}{\cos\left(x^{2}\right)}$$
Valid where:
  • $\cos\left(x^{2}\right)>0$ – The logarithm argument must be positive.

The derivative is only valid where the original function is defined.

Copy link to this solution
Cross-check with a computer algebra system

The derivative computed directly by the computer algebra system Maxima:

$$-\frac{2\,x\,\sin\left(x^{2}\right)}{\cos\left(x^{2}\right)}$$

Step-by-step result ↔ Maxima: identical ✓