How to use these solu­tions

These are full worked solu­tions to the twelve ques­tions in Con­ti­nu­ity and Dif­fer­en­tia­bil­ity: Mixed Prac­tice. Attempt each ques­tion on your own first. For con­ti­nu­ity ques­tions, com­pare the left limit, the right limit and the value; for deriv­a­tives, name the rule (chain rule, log­a­rith­mic dif­fer­en­ti­a­tion, para­met­ric form) before you use it. Then read the solu­tion and find the first step where your work­ing dif­fers.

Ques­tion 1: Choos­ing kk for con­ti­nu­ity

The prob­lem

Find kk so that f(x)={kx2,x≤23,x>2f(x) = \begin{cases} kx^2, & x \le 2 \\ 3, & x > 2 \end{cases} is con­tin­u­ous at 22.

Under­stand­ing the prob­lem

The func­tion is defined by one rule up to x=2x = 2 and another after it. Con­ti­nu­ity at 22 means the graph has no jump there: the left limit, the right limit and f(2)f(2) must all be equal.

The idea

Use the def­i­n­i­tion: ff is con­tin­u­ous at cc when lim⁡x→c−f(x)=lim⁡x→c+f(x)=f(c)\displaystyle \lim_{x \to c^-} f(x) = \lim_{x \to c^+} f(x) = f(c). Write each in terms of kk and solve.

Step-by-step solu­tion

Step 1. Value at 22. Since 2≤22 \le 2, the first rule applies.

f(2)=k(2)2=4kf(2) = k(2)^2 = 4k

Step 2. Left limit (val­ues of xx just below 22 use kx2kx^2).

lim⁡x→2−kx2=4k\displaystyle \lim_{x \to 2^-} kx^2 = 4k

Step 3. Right limit (val­ues just above 22 use the con­stant 33).

lim⁡x→2+3=3\displaystyle \lim_{x \to 2^+} 3 = 3

Step 4. For con­ti­nu­ity all three must match.

4k=3⟹k=34\displaystyle 4k = 3 \quad\Longrightarrow\quad k = \frac{3}{4}

Check­ing the answer

With k=34\displaystyle k = \frac{3}{4}: f(2)=34×4=3\displaystyle f(2) = \frac{3}{4} \times 4 = 3, equal to the right-hand value 33. ✓

Answer

k=34\displaystyle k = \frac{3}{4}.

Ques­tion 2: Con­ti­nu­ity of ∣x∣−∣x+1∣\lvert x \rvert - \lvert x + 1 \rvert

The prob­lem

Dis­cuss the con­ti­nu­ity of f(x)=∣x∣−∣x+1∣f(x) = \lvert x \rvert - \lvert x + 1 \rvert.

Under­stand­ing the prob­lem

"Dis­cuss con­ti­nu­ity" means find where ff is con­tin­u­ous and where (if any­where) it is not. The cor­ners of the mod­u­lus graphs at x=0x = 0 and x=−1x = -1 are the places to think about.

The idea

The mod­u­lus func­tion ∣x∣\lvert x \rvert is con­tin­u­ous every­where, and so is ∣x+1∣\lvert x + 1 \rvert (a mod­u­lus of a poly­no­mial). The dif­fer­ence of two con­tin­u­ous func­tions is con­tin­u­ous.

Step-by-step solu­tion

Step 1. g(x)=∣x∣g(x) = \lvert x \rvert is con­tin­u­ous at every real num­ber.

Step 2. h(x)=∣x+1∣h(x) = \lvert x + 1 \rvert is the com­pos­ite of the poly­no­mial x+1x + 1 and the mod­u­lus func­tion, both con­tin­u­ous, so it is con­tin­u­ous every­where.

Step 3. f=g−hf = g - h is a dif­fer­ence of con­tin­u­ous func­tions, so it is con­tin­u­ous at every real xx.

Step 4. A direct check at the cor­ner x=−1x = -1: for x<−1x < -1, f(x)=−x+(x+1)=1f(x) = -x + (x + 1) = 1; for −1≤x<0-1 \le x < 0, f(x)=−x−(x+1)=−2x−1f(x) = -x - (x + 1) = -2x - 1, which gives 11 at x=−1x = -1. Both sides agree, so there is no jump. The same hap­pens at x=0x = 0, where both pieces give −1-1.

Check­ing the answer

Con­ti­nu­ity says noth­ing about smooth­ness: the graph has cor­ners at −1-1 and 00, but no breaks.

Answer

ff is con­tin­u­ous at every real num­ber.

Ques­tion 3: Points of dis­con­ti­nu­ity of a ratio­nal func­tion

The prob­lem

Find the points of dis­con­ti­nu­ity of f(x)=x2+1x2−5x+6\displaystyle f(x) = \frac{x^2 + 1}{x^2 - 5x + 6}.

Under­stand­ing the prob­lem

A ratio­nal func­tion is con­tin­u­ous wher­ever it is defined. It is unde­fined where the denom­i­na­tor is zero.

The idea

Fac­torise the denom­i­na­tor and find its zeros.

Step-by-step solu­tion

Step 1. Fac­torise.

x2−5x+6=(x−2)(x−3)x^2 - 5x + 6 = (x - 2)(x - 3)

Step 2. The denom­i­na­tor is zero at x=2x = 2 and x=3x = 3, so ff is not defined there.

Step 3. The numer­a­tor x2+1x^2 + 1 is never zero, so noth­ing can­cels; ff blows up at both points. Every­where else ff is a quo­tient of con­tin­u­ous poly­no­mi­als with non-zero denom­i­na­tor, hence con­tin­u­ous.

Check­ing the answer

At x=2.01x = 2.01 the denom­i­na­tor is about −0.0099-0.0099 and f≈−509f \approx -509; at x=1.99x = 1.99, f≈+491f \approx +491. A huge jump, as expected.

Answer

ff is dis­con­tin­u­ous only at x=2x = 2 and x=3x = 3.

Ques­tion 4: A chain of three func­tions

The prob­lem

Dif­fer­en­ti­ate sin⁡(cos⁡(x2))\sin(\cos(x^2)).

Under­stand­ing the prob­lem

This is a com­pos­ite of three func­tions: square, then cosine, then sine. You need ddx\displaystyle \frac{d}{dx} of the whole.

The idea

Use the chain rule from the out­side in: dif­fer­en­ti­ate the outer func­tion, keep its inside unchanged, then mul­ti­ply by the deriv­a­tive of the inside, and repeat.

Step-by-step solu­tion

Step 1. Outer func­tion sin⁡( ⋅ )\sin(\,\cdot\,): its deriv­a­tive is cos⁡( ⋅ )\cos(\,\cdot\,).

ddxsin⁡(cos⁡x2)=cos⁡(cos⁡x2)⋅ddxcos⁡(x2)\displaystyle \frac{d}{dx}\sin(\cos x^2) = \cos(\cos x^2) \cdot \frac{d}{dx}\cos(x^2)

Step 2. Mid­dle func­tion cos⁡( ⋅ )\cos(\,\cdot\,): its deriv­a­tive is −sin⁡( ⋅ )-\sin(\,\cdot\,).

ddxcos⁡(x2)=−sin⁡(x2)⋅ddx(x2)=−sin⁡(x2)⋅2x\displaystyle \frac{d}{dx}\cos(x^2) = -\sin(x^2) \cdot \frac{d}{dx}(x^2) = -\sin(x^2) \cdot 2x

Step 3. Mul­ti­ply.

ddxsin⁡(cos⁡x2)=−2xsin⁡(x2)cos⁡(cos⁡x2)\displaystyle \frac{d}{dx}\sin(\cos x^2) = -2x\sin(x^2)\cos(\cos x^2)

Check­ing the answer

At x=0x = 0 the func­tion has a flat point (it depends on x2x^2, an even func­tion), and our deriv­a­tive is 00 at x=0x = 0. ✓

Answer

ddxsin⁡(cos⁡x2)=−2xsin⁡(x2)cos⁡(cos⁡(x2))\displaystyle \frac{d}{dx}\sin(\cos x^2) = -2x\sin(x^2)\cos(\cos(x^2)).

Ques­tion 5: An inverse secant by sub­sti­tu­tion

The prob­lem

Dif­fer­en­ti­ate sec⁡−112x2−1\displaystyle \sec^{-1}\frac{1}{2x^2 - 1} for 0<x<12\displaystyle 0 < x < \frac{1}{\sqrt{2}}.

Under­stand­ing the prob­lem

Dif­fer­en­ti­at­ing directly is messy. The expres­sion 2x2−12x^2 - 1 is the dou­ble-angle form 2cos⁡2θ−1=cos⁡2θ2\cos^2\theta - 1 = \cos 2\theta, so a sub­sti­tu­tion will sim­plify it. You must also check the range so that sec⁡−1(sec⁡2θ)=2θ\sec^{-1}(\sec 2\theta) = 2\theta is valid.

The idea

Put x=cos⁡θx = \cos\theta. Sim­plify the func­tion to a mul­ti­ple of θ\theta, then dif­fer­en­ti­ate using θ=cos⁡−1x\theta = \cos^{-1}x.

Step-by-step solu­tion

Step 1. Sub­sti­tute x=cos⁡θx = \cos\theta. Since 0<x<12\displaystyle 0 < x < \frac{1}{\sqrt{2}}, we have π4<θ<π2\displaystyle \frac{\pi}{4} < \theta < \frac{\pi}{2}.

12x2−1=12cos⁡2θ−1=1cos⁡2θ=sec⁡2θ\displaystyle \frac{1}{2x^2 - 1} = \frac{1}{2\cos^2\theta - 1} = \frac{1}{\cos 2\theta} = \sec 2\theta

Step 2. Check the range. π2<2θ<π\displaystyle \frac{\pi}{2} < 2\theta < \pi, which lies inside the prin­ci­pal range [0,π][0, \pi], ≠π2\displaystyle \ne \frac{\pi}{2}, of sec⁡−1\sec^{-1}. So

y=sec⁡−1(sec⁡2θ)=2θ=2cos⁡−1xy = \sec^{-1}(\sec 2\theta) = 2\theta = 2\cos^{-1}x

Step 3. Dif­fer­en­ti­ate, using ddxcos⁡−1x=−11−x2\displaystyle \frac{d}{dx}\cos^{-1}x = -\frac{1}{\sqrt{1 - x^2}}.

dydx=2×(−11−x2)=−21−x2\displaystyle \frac{dy}{dx} = 2 \times \left(-\frac{1}{\sqrt{1 - x^2}}\right) = -\frac{2}{\sqrt{1 - x^2}}

Check­ing the answer

At x=0.5x = 0.5: 12(0.25)−1=−2\displaystyle \frac{1}{2(0.25) - 1} = -2, and a numer­i­cal deriv­a­tive of sec⁡−1\sec^{-1} of the expres­sion near 0.50.5 gives about −2.309-2.309, while −20.75≈−2.309\displaystyle -\frac{2}{\sqrt{0.75}} \approx -2.309. ✓

Answer

dydx=−21−x2\displaystyle \frac{dy}{dx} = -\frac{2}{\sqrt{1 - x^2}}.

Com­mon mis­take to avoid

Writ­ing sec⁡−1(sec⁡2θ)=2θ\sec^{-1}(\sec 2\theta) = 2\theta with­out check­ing that 2θ2\theta lies in the prin­ci­pal range. Here it does; on another inter­val of xx the answer would change.

Ques­tion 6: Implicit func­tion yx=xyy^x = x^y

The prob­lem

Find dydx\displaystyle \frac{dy}{dx} if yx=xyy^x = x^y.

Under­stand­ing the prob­lem

Both sides have a vari­able in the base and in the power, and yy can­not eas­ily be made the sub­ject. You need dydx\displaystyle \frac{dy}{dx}.

The idea

Take log­a­rithms to bring the pow­ers down, then dif­fer­en­ti­ate both sides implic­itly with respect to xx, using the prod­uct rule and remem­ber­ing that yy is a func­tion of xx.

Step-by-step solu­tion

Step 1. Take log⁡\log of both sides.

xlog⁡y=ylog⁡xx\log y = y\log x

Step 2. Dif­fer­en­ti­ate each side with the prod­uct rule.

log⁡y+x⋅1ydydx=dydxlog⁡x+y⋅1x\displaystyle \log y + x \cdot \frac{1}{y}\frac{dy}{dx} = \frac{dy}{dx}\log x + y \cdot \frac{1}{x}

Step 3. Col­lect the dydx\displaystyle \frac{dy}{dx} terms on the left.

dydx(xy−log⁡x)=yx−log⁡y\displaystyle \frac{dy}{dx}\left(\frac{x}{y} - \log x\right) = \frac{y}{x} - \log y

Step 4. Divide.

dydx=yx−log⁡yxy−log⁡x\displaystyle \frac{dy}{dx} = \frac{\dfrac{y}{x} - \log y}{\dfrac{x}{y} - \log x}

Check­ing the answer

A sym­bolic check (implicit dif­fer­en­ti­a­tion of xlog⁡y−ylog⁡x=0x\log y - y\log x = 0) gives the same expres­sion. Also, on the line y=xy = x (which sat­is­fies the equa­tion), the for­mula gives 1−log⁡x1−log⁡x=1\displaystyle \frac{1 - \log x}{1 - \log x} = 1, the slope of y=xy = x. ✓

Answer

dydx=yx−log⁡yxy−log⁡x\displaystyle \frac{dy}{dx} = \frac{\frac{y}{x} - \log y}{\frac{x}{y} - \log x}, equiv­a­lently y(y−xlog⁡y)x(x−ylog⁡x)\displaystyle \frac{y(y - x\log y)}{x(x - y\log x)}.

Ques­tion 7: A para­met­ric deriv­a­tive

The prob­lem

Find dydx\displaystyle \frac{dy}{dx} if x=cos⁡θ+θsin⁡θx = \cos\theta + \theta\sin\theta, y=sin⁡θ−θcos⁡θy = \sin\theta - \theta\cos\theta.

Under­stand­ing the prob­lem

xx and yy are each given in terms of a para­me­ter θ\theta. You need the slope dydx\displaystyle \frac{dy}{dx}.

The idea

Use the para­met­ric rule dydx=dy/dθdx/dθ\displaystyle \frac{dy}{dx} = \frac{dy/d\theta}{dx/d\theta}. Each deriv­a­tive needs the prod­uct rule.

Step-by-step solu­tion

Step 1. Dif­fer­en­ti­ate xx.

dxdθ=−sin⁡θ+(sin⁡θ+θcos⁡θ)=θcos⁡θ\displaystyle \frac{dx}{d\theta} = -\sin\theta + (\sin\theta + \theta\cos\theta) = \theta\cos\theta

Step 2. Dif­fer­en­ti­ate yy.

dydθ=cos⁡θ−(cos⁡θ−θsin⁡θ)=θsin⁡θ\displaystyle \frac{dy}{d\theta} = \cos\theta - (\cos\theta - \theta\sin\theta) = \theta\sin\theta

Step 3. Divide.

dydx=θsin⁡θθcos⁡θ=tan⁡θ\displaystyle \frac{dy}{dx} = \frac{\theta\sin\theta}{\theta\cos\theta} = \tan\theta

Check­ing the answer

The θ\theta can­cels only when θ≠0\theta \ne 0; at θ=0\theta = 0 both deriv­a­tives are 00 and the rule does not apply there. Else­where the result tan⁡θ\tan\theta is valid.

Answer

dydx=tan⁡θ\displaystyle \frac{dy}{dx} = \tan\theta.

Ques­tion 8: A vari­able power (log⁡x)cos⁡x(\log x)^{\cos x}

The prob­lem

Dif­fer­en­ti­ate (log⁡x)cos⁡x(\log x)^{\cos x}.

Under­stand­ing the prob­lem

The base and the expo­nent both depend on xx, so nei­ther the power rule nor the expo­nen­tial rule applies directly. (We need log⁡x>0\log x > 0, that is x>1x > 1.)

The idea

Log­a­rith­mic dif­fer­en­ti­a­tion: put y=(log⁡x)cos⁡xy = (\log x)^{\cos x}, take log⁡\log, dif­fer­en­ti­ate, then mul­ti­ply back by yy.

Step-by-step solu­tion

Step 1. Take log­a­rithms.

log⁡y=cos⁡x⋅log⁡(log⁡x)\log y = \cos x \cdot \log(\log x)

Step 2. Dif­fer­en­ti­ate both sides. On the right use the prod­uct rule and the chain rule for log⁡(log⁡x)\log(\log x).

1ydydx=−sin⁡x log⁡(log⁡x)+cos⁡x⋅1log⁡x⋅1x\displaystyle \frac{1}{y}\frac{dy}{dx} = -\sin x\,\log(\log x) + \cos x \cdot \frac{1}{\log x} \cdot \frac{1}{x}

Step 3. Mul­ti­ply by yy.

dydx=(log⁡x)cos⁡x(cos⁡xxlog⁡x−sin⁡x log⁡(log⁡x))\displaystyle \frac{dy}{dx} = (\log x)^{\cos x}\left(\frac{\cos x}{x\log x} - \sin x\,\log(\log x)\right)

Check­ing the answer

A sym­bolic check with sympy gives a dif­fer­ence of 00 from this expres­sion.

Answer

ddx(log⁡x)cos⁡x=(log⁡x)cos⁡x(cos⁡xxlog⁡x−sin⁡x log⁡(log⁡x))\displaystyle \frac{d}{dx}(\log x)^{\cos x} = (\log x)^{\cos x}\left(\frac{\cos x}{x\log x} - \sin x\,\log(\log x)\right).

Ques­tion 9: A sec­ond-order rela­tion

The prob­lem

If y=3cos⁡(log⁡x)+4sin⁡(log⁡x)y = 3\cos(\log x) + 4\sin(\log x), show that x2y′′+xy′+y=0x^2 y'' + x y' + y = 0.

Under­stand­ing the prob­lem

You must find y′y' and y′′y'' and show that the given com­bi­na­tion is zero. Expand­ing y′′y'' directly is messy; there is a neater route.

The idea

Find y′y', mul­ti­ply by xx to remove the frac­tion, and then dif­fer­en­ti­ate xy′xy' using the prod­uct rule. That pro­duces xy′′+y′xy'' + y' directly.

Step-by-step solu­tion

Step 1. Dif­fer­en­ti­ate with the chain rule (ddxlog⁡x=1x\displaystyle \frac{d}{dx}\log x = \frac{1}{x}).

y′=−3sin⁡(log⁡x)⋅1x+4cos⁡(log⁡x)⋅1x\displaystyle y' = -3\sin(\log x) \cdot \frac{1}{x} + 4\cos(\log x) \cdot \frac{1}{x}

Step 2. Mul­ti­ply by xx.

xy′=−3sin⁡(log⁡x)+4cos⁡(log⁡x)xy' = -3\sin(\log x) + 4\cos(\log x)

Step 3. Dif­fer­en­ti­ate both sides. The left side needs the prod­uct rule.

xy′′+y′=−3cos⁡(log⁡x)⋅1x−4sin⁡(log⁡x)⋅1x\displaystyle xy'' + y' = -3\cos(\log x) \cdot \frac{1}{x} - 4\sin(\log x) \cdot \frac{1}{x}

Step 4. The right side is −1x(3cos⁡(log⁡x)+4sin⁡(log⁡x))=−yx\displaystyle -\frac{1}{x}\big(3\cos(\log x) + 4\sin(\log x)\big) = -\frac{y}{x}.

xy′′+y′=−yx\displaystyle xy'' + y' = -\frac{y}{x}

Step 5. Mul­ti­ply by xx and rearrange.

x2y′′+xy′+y=0x^2y'' + xy' + y = 0

Check­ing the answer

Sub­sti­tut­ing yy into x2y′′+xy′+yx^2y'' + xy' + y sym­bol­i­cally sim­pli­fies to 00.

Answer

x2y′′+xy′+y=0x^2 y'' + x y' + y = 0, as required.

Ques­tion 10: A trigono­met­ric sub­sti­tu­tion

The prob­lem

If 1−x2+1−y2=a(x−y)\sqrt{1 - x^2} + \sqrt{1 - y^2} = a(x - y), show that dydx=1−y21−x2\displaystyle \frac{dy}{dx} = \sqrt{\frac{1 - y^2}{1 - x^2}}. (Put x=sin⁡Ax = \sin A, y=sin⁡By = \sin B.)

Under­stand­ing the prob­lem

Dif­fer­en­ti­at­ing the equa­tion as it stands is pos­si­ble but heavy. The hint sug­gests a sub­sti­tu­tion that turns the square roots into cosines. The goal is to show that A−BA - B is a con­stant.

The idea

With x=sin⁡Ax = \sin A, y=sin⁡By = \sin B we get 1−x2=cos⁡A\sqrt{1 - x^2} = \cos A and 1−y2=cos⁡B\sqrt{1 - y^2} = \cos B (tak­ing A,BA, B in [−π2,π2]\displaystyle \left[-\tfrac{\pi}{2}, \tfrac{\pi}{2}\right]). Use the sum-to-prod­uct for­mu­las to sim­plify, then dif­fer­en­ti­ate sin⁡−1x−sin⁡−1y=constant\sin^{-1}x - \sin^{-1}y = \text{constant}.

Step-by-step solu­tion

Step 1. Sub­sti­tute.

cos⁡A+cos⁡B=a(sin⁡A−sin⁡B)\cos A + \cos B = a(\sin A - \sin B)

Step 2. Use sum-to-prod­uct for­mu­las.

2cos⁡A+B2cos⁡A−B2=a⋅2cos⁡A+B2sin⁡A−B2\displaystyle 2\cos\frac{A + B}{2}\cos\frac{A - B}{2} = a \cdot 2\cos\frac{A + B}{2}\sin\frac{A - B}{2}

Step 3. Can­cel 2cos⁡A+B2\displaystyle 2\cos\frac{A + B}{2} (non-zero).

cos⁡A−B2=asin⁡A−B2⟹cot⁡A−B2=a\displaystyle \cos\frac{A - B}{2} = a\sin\frac{A - B}{2} \quad\Longrightarrow\quad \cot\frac{A - B}{2} = a

Step 4. So A−B2=cot⁡−1a\displaystyle \frac{A - B}{2} = \cot^{-1}a, a con­stant. Hence

sin⁡−1x−sin⁡−1y=2cot⁡−1a=constant\sin^{-1}x - \sin^{-1}y = 2\cot^{-1}a = \text{constant}

Step 5. Dif­fer­en­ti­ate with respect to xx.

11−x2−11−y2dydx=0\displaystyle \frac{1}{\sqrt{1 - x^2}} - \frac{1}{\sqrt{1 - y^2}}\frac{dy}{dx} = 0

Step 6. Solve for dydx\displaystyle \frac{dy}{dx}.

dydx=1−y21−x2=1−y21−x2\displaystyle \frac{dy}{dx} = \frac{\sqrt{1 - y^2}}{\sqrt{1 - x^2}} = \sqrt{\frac{1 - y^2}{1 - x^2}}

Check­ing the answer

Numer­i­cally, with a=2a = 2 and x=0.5x = 0.5, solv­ing the equa­tion for yy and com­put­ing the implicit slope gives 1.06191.0619, and 1−y21−x2\displaystyle \sqrt{\frac{1 - y^2}{1 - x^2}} gives the same 1.06191.0619. ✓

Answer

dydx=1−y21−x2\displaystyle \frac{dy}{dx} = \sqrt{\frac{1 - y^2}{1 - x^2}}, as required.

Ques­tion 11: A sum of two vari­able pow­ers

The prob­lem

Dif­fer­en­ti­ate xx2−3+(x−3)x2x^{x^2 - 3} + (x - 3)^{x^2} for x>3x > 3.

Under­stand­ing the prob­lem

Each term has a vari­able base and a vari­able expo­nent. You can­not take the log­a­rithm of a sum use­fully, so treat the two terms sep­a­rately.

The idea

Write u=xx2−3u = x^{x^2 - 3} and v=(x−3)x2v = (x - 3)^{x^2}. Then dydx=dudx+dvdx\displaystyle \frac{dy}{dx} = \frac{du}{dx} + \frac{dv}{dx}, and find each by log­a­rith­mic dif­fer­en­ti­a­tion. The con­di­tion x>3x > 3 makes log⁡(x−3)\log(x - 3) defined.

Step-by-step solu­tion

Step 1. For uu: take log­a­rithms and dif­fer­en­ti­ate.

log⁡u=(x2−3)log⁡x1ududx=2xlog⁡x+(x2−3)⋅1xdudx=xx2−3(x2−3x+2xlog⁡x)\displaystyle \begin{aligned} \log u &= (x^2 - 3)\log x \\ \frac{1}{u}\frac{du}{dx} &= 2x\log x + (x^2 - 3)\cdot\frac{1}{x} \\ \frac{du}{dx} &= x^{x^2 - 3}\left(\frac{x^2 - 3}{x} + 2x\log x\right) \end{aligned}

Step 2. For vv: the same method.

log⁡v=x2log⁡(x−3)1vdvdx=2xlog⁡(x−3)+x2⋅1x−3dvdx=(x−3)x2(x2x−3+2xlog⁡(x−3))\displaystyle \begin{aligned} \log v &= x^2\log(x - 3) \\ \frac{1}{v}\frac{dv}{dx} &= 2x\log(x - 3) + x^2 \cdot \frac{1}{x - 3} \\ \frac{dv}{dx} &= (x - 3)^{x^2}\left(\frac{x^2}{x - 3} + 2x\log(x - 3)\right) \end{aligned}

Step 3. Add.

dydx=xx2−3(x2−3x+2xlog⁡x)+(x−3)x2(x2x−3+2xlog⁡(x−3))\displaystyle \frac{dy}{dx} = x^{x^2 - 3}\left(\frac{x^2 - 3}{x} + 2x\log x\right) + (x - 3)^{x^2}\left(\frac{x^2}{x - 3} + 2x\log(x - 3)\right)

Check­ing the answer

At x=4.3x = 4.3 the for­mula matches the deriv­a­tive com­puted by sympy (dif­fer­ence 00).

Answer

dydx=xx2−3(x2−3x+2xlog⁡x)+(x−3)x2(x2x−3+2xlog⁡(x−3))\displaystyle \frac{dy}{dx} = x^{x^2 - 3}\left(\frac{x^2 - 3}{x} + 2x\log x\right) + (x - 3)^{x^2}\left(\frac{x^2}{x - 3} + 2x\log(x - 3)\right).

Com­mon mis­take to avoid

Tak­ing log⁡\log of the whole sum and writ­ing log⁡(u+v)=log⁡u+log⁡v\log(u + v) = \log u + \log v. That is false; split the sum first.

Ques­tion 12: Con­tin­u­ous but not dif­fer­en­tiable

The prob­lem

Show that f(x)=∣x−1∣+∣x−2∣f(x) = \lvert x - 1 \rvert + \lvert x - 2 \rvert is con­tin­u­ous every­where but not dif­fer­en­tiable at 11 and 22.

Under­stand­ing the prob­lem

Two things must be shown: (i) no breaks any­where; (ii) at x=1x = 1 and x=2x = 2 the left-hand and right-hand deriv­a­tives dif­fer (the graph has cor­ners).

The idea

Con­ti­nu­ity fol­lows because a sum of con­tin­u­ous func­tions is con­tin­u­ous. For dif­fer­en­tia­bil­ity, remove the mod­u­lus signs on each inter­val to get a straight-line for­mula, then com­pare slopes on either side of 11 and of 22.

Step-by-step solu­tion

Step 1. Con­ti­nu­ity. ∣x−1∣\lvert x - 1 \rvert and ∣x−2∣\lvert x - 2 \rvert are each con­tin­u­ous every­where, so their sum ff is con­tin­u­ous every­where.

Step 2. Write ff with­out mod­u­lus signs.

f(x)={(1−x)+(2−x)=3−2x,x<1(x−1)+(2−x)=1,1≤x≤2(x−1)+(x−2)=2x−3,x>2f(x) = \begin{cases} (1 - x) + (2 - x) = 3 - 2x, & x < 1 \\ (x - 1) + (2 - x) = 1, & 1 \le x \le 2 \\ (x - 1) + (x - 2) = 2x - 3, & x > 2 \end{cases}

Step 3. At x=1x = 1: the left-hand deriv­a­tive is the slope of 3−2x3 - 2x, which is −2-2; the right-hand deriv­a­tive is the slope of the con­stant 11, which is 00.

Lf′(1)=−2≠0=Rf′(1)Lf'(1) = -2 \ne 0 = Rf'(1)

So ff is not dif­fer­en­tiable at 11.

Step 4. At x=2x = 2: left-hand deriv­a­tive 00 (con­stant piece), right-hand deriv­a­tive 22 (slope of 2x−32x - 3).

Lf′(2)=0≠2=Rf′(2)Lf'(2) = 0 \ne 2 = Rf'(2)

So ff is not dif­fer­en­tiable at 22.

Check­ing the answer

The pieces meet: at x=1x = 1, 3−2=13 - 2 = 1; at x=2x = 2, 4−3=14 - 3 = 1. So the graph is joined (con­tin­u­ous) but bends sharply at both points.

Answer

ff is con­tin­u­ous every­where; at x=1x = 1 the one-sided deriv­a­tives are −2-2 and 00, and at x=2x = 2 they are 00 and 22, so ff is not dif­fer­en­tiable at 11 or 22.