AP Calculus AB · BC

Core Concept
Mastery Test

20 essential problems spanning every major topic — crafted to match AP exam difficulty and style.

20
Problems
8
Topics
45
Min Timer
5
AP Score
Time Remaining
45:00
Score: 0 / 20
Concept Review
1
Limits & Continuity
AB · BC
\(\displaystyle\lim_{x \to c} f(x) = L\) iff \(\displaystyle\lim_{x \to c^-} f(x) = \lim_{x \to c^+} f(x) = L\)

L'Hôpital's Rule: if \(\frac{0}{0}\) or \(\frac{\infty}{\infty}\), then \(\displaystyle\lim_{x\to c}\frac{f(x)}{g(x)} = \lim_{x\to c}\frac{f'(x)}{g'(x)}\)

Squeeze Theorem: \(g(x)\le f(x)\le h(x)\) and \(\lim g=\lim h=L \Rightarrow \lim f=L\)
🧠 Must Memorize

• \(\lim_{x\to 0}\frac{\sin x}{x}=1\)  |  \(\lim_{x\to 0}\frac{1-\cos x}{x}=0\)
• Continuity requires: defined, limit exists, and limit = value
• Removable discontinuity = hole; Jump = one-sided limits differ; Infinite = vertical asymptote

Example

Evaluate \(\displaystyle\lim_{x\to 0}\frac{\tan(3x)}{5x}\)

Solution: \(\dfrac{\tan(3x)}{5x} = \dfrac{\sin(3x)}{5x\cos(3x)} = \dfrac{3}{5}\cdot\dfrac{\sin(3x)}{3x}\cdot\dfrac{1}{\cos(3x)} \to \dfrac{3}{5}\cdot 1 \cdot 1 = \dfrac{3}{5}\)
2
Differentiation Rules
AB · BC
Power: \(\frac{d}{dx}[x^n]=nx^{n-1}\)
Chain: \(\frac{d}{dx}[f(g(x))]=f'(g(x))\cdot g'(x)\)
Product: \((uv)'=u'v+uv'\)  |  Quotient: \(\left(\frac{u}{v}\right)'=\frac{u'v-uv'}{v^2}\)

Trig: \((\sin x)'=\cos x\), \((\cos x)'=-\sin x\), \((\tan x)'=\sec^2 x\)
Exp/Log: \((e^x)'=e^x\), \((\ln x)'=\frac{1}{x}\), \((a^x)'=a^x\ln a\)
🧠 Implicit Differentiation

Differentiate both sides with respect to \(x\); treat \(y\) as a function of \(x\), applying the chain rule: \(\frac{d}{dx}[y^n]=ny^{n-1}\frac{dy}{dx}\)

Example

If \(x^2+y^2=25\), find \(\dfrac{dy}{dx}\).

Answer: \(2x+2y\dfrac{dy}{dx}=0 \Rightarrow \dfrac{dy}{dx}=-\dfrac{x}{y}\)
3
Applications of Derivatives
AB · BC
MVT: \(f'(c)=\dfrac{f(b)-f(a)}{b-a}\) for some \(c\in(a,b)\)

Critical Points: \(f'(x)=0\) or undefined
Inflection Points: \(f''(x)\) changes sign

Optimization: Set \(f'(x)=0\), verify with first or second derivative test
🧠 Sign Charts

• \(f'>0\): increasing; \(f'<0\): decreasing
• \(f''>0\): concave up; \(f''<0\): concave down
• Relative max where \(f'\) changes from \(+\) to \(-\)

Example

Find the absolute maximum of \(f(x)=x^3-3x\) on \([-2,2]\).

Answer: \(f'(x)=3x^2-3=0 \Rightarrow x=\pm1\). Values: \(f(-2)=-2, f(-1)=2, f(1)=-2, f(2)=2\). Absolute max = \(2\) at \(x=\pm1\) and \(x=2\).
4
Integration Fundamentals
AB · BC
FTC Part 1: \(\dfrac{d}{dx}\int_a^x f(t)\,dt = f(x)\)

FTC Part 2: \(\int_a^b f(x)\,dx = F(b)-F(a)\)

\(u\)-sub: Let \(u=g(x)\), \(du=g'(x)\,dx\), change bounds if definite

IBP: \(\int u\,dv = uv - \int v\,du\) (use LIATE order)
🧠 Key Antiderivatives

\(\int x^n\,dx=\dfrac{x^{n+1}}{n+1}+C\) \((n\ne-1)\)  |  \(\int\dfrac{1}{x}\,dx=\ln|x|+C\)
\(\int e^x\,dx=e^x+C\)  |  \(\int\sin x\,dx=-\cos x+C\)  |  \(\int\sec^2 x\,dx=\tan x+C\)

Example

Evaluate \(\displaystyle\int_0^1 x e^{x^2}\,dx\).

Answer: Let \(u=x^2\), \(du=2x\,dx\). \(\displaystyle\frac{1}{2}\int_0^1 e^u\,du = \frac{1}{2}[e^u]_0^1 = \frac{e-1}{2}\)
5
Infinite Series & Convergence
BC Only
Ratio Test: \(\displaystyle\lim_{n\to\infty}\left|\frac{a_{n+1}}{a_n}\right|=L\): converges if \(L<1\), diverges if \(L>1\)

Taylor Series: \(\displaystyle f(x)=\sum_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}(x-a)^n\)

Maclaurin: \(e^x=\sum\frac{x^n}{n!}\), \(\sin x=\sum\frac{(-1)^n x^{2n+1}}{(2n+1)!}\), \(\cos x=\sum\frac{(-1)^n x^{2n}}{(2n)!}\)
🧠 Convergence Tests Summary

• Geometric: \(\sum ar^n\) converges iff \(|r|<1\); sum \(=\dfrac{a}{1-r}\)
• p-series: \(\sum\dfrac{1}{n^p}\) converges iff \(p>1\)
• Alternating: converges if \(a_n\) decreasing and \(\to 0\)

Example

Find the interval of convergence of \(\displaystyle\sum_{n=0}^{\infty}\frac{x^n}{n+1}\).

Answer: Ratio test: \(L=|x|\). Converges for \(|x|<1\). At \(x=1\): harmonic diverges. At \(x=-1\): alternating series converges. IOC: \([-1,1)\).
6
Parametric, Polar & Vector
BC Only
Parametric slope: \(\dfrac{dy}{dx}=\dfrac{dy/dt}{dx/dt}\)

Arc length (parametric): \(\displaystyle L=\int_a^b\sqrt{\left(\frac{dx}{dt}\right)^2+\left(\frac{dy}{dt}\right)^2}\,dt\)

Polar area: \(\displaystyle A=\frac{1}{2}\int_\alpha^\beta r^2\,d\theta\)

Polar arc length: \(\displaystyle L=\int_\alpha^\beta\sqrt{r^2+\left(\frac{dr}{d\theta}\right)^2}\,d\theta\)
🧠 Polar Basics

\(x=r\cos\theta\), \(y=r\sin\theta\), \(r^2=x^2+y^2\)
Common curves: rose \(r=a\cos(n\theta)\), cardioid \(r=a(1+\cos\theta)\), lemniscate \(r^2=a^2\cos(2\theta)\)

Example

If \(x=t^2\), \(y=t^3\), find \(\dfrac{dy}{dx}\) at \(t=2\).

Answer: \(\dfrac{dy/dt}{dx/dt}=\dfrac{3t^2}{2t}=\dfrac{3t}{2}\). At \(t=2\): \(\dfrac{dy}{dx}=3\)
7
Differential Equations
AB · BC
Separation of variables: \(\dfrac{dy}{dx}=f(x)g(y)\Rightarrow \dfrac{dy}{g(y)}=f(x)\,dx\)

Exponential model: \(\dfrac{dy}{dt}=ky \Rightarrow y=y_0 e^{kt}\)

Logistic (BC): \(\dfrac{dy}{dt}=ky\left(1-\dfrac{y}{L}\right)\), carrying capacity \(=L\)

Euler's Method: \(y_{n+1}=y_n+h\cdot f(x_n,y_n)\)
🧠 Slope Fields

Slope field plots \(\dfrac{dy}{dx}\) at many points. A solution curve is tangent to the field at every point. Equilibrium solutions occur where \(\dfrac{dy}{dx}=0\) everywhere on the curve.

Example

Solve \(\dfrac{dy}{dx}=2xy\) with \(y(0)=3\).

Answer: \(\dfrac{dy}{y}=2x\,dx \Rightarrow \ln|y|=x^2+C \Rightarrow y=Ae^{x^2}\). At \(x=0\): \(A=3\). So \(y=3e^{x^2}\).
8
Applications of Integration
AB · BC
Area between curves: \(\displaystyle A=\int_a^b[f(x)-g(x)]\,dx\)

Volume (disk): \(\displaystyle V=\pi\int_a^b[f(x)]^2\,dx\)

Volume (washer): \(\displaystyle V=\pi\int_a^b\left([f(x)]^2-[g(x)]^2\right)\,dx\)

Volume (shell): \(\displaystyle V=2\pi\int_a^b x\,f(x)\,dx\)
🧠 Average Value

\(f_{avg}=\dfrac{1}{b-a}\int_a^b f(x)\,dx\)
Net vs. total distance: Net \(=\int v(t)\,dt\); Total \(=\int|v(t)|\,dt\)

Example

Find the volume of the solid obtained by rotating \(y=\sqrt{x}\) about the \(x\)-axis from \(x=0\) to \(x=4\).

Answer: \(\pi\displaystyle\int_0^4 x\,dx = \pi\left[\dfrac{x^2}{2}\right]_0^4 = 8\pi\)

📝 Practice Test

20 multiple-choice problems · AP exam style · Select an answer to receive immediate feedback

Q1 Limits Medium
\[\lim_{x \to 3} \frac{x^2 - 9}{x - 3}\] What is the value of the limit above?
Q2 Continuity Medium
Let \(f(x) = \begin{cases} x^2 + 1 & x < 2 \\ kx - 1 & x \ge 2 \end{cases}\). For what value of \(k\) is \(f\) continuous at \(x = 2\)?
Q3 Differentiation Medium
If \(f(x) = x^3 \sin x\), then \(f'(x) =\)
Q4 Chain Rule Medium
If \(h(x) = \ln(\cos x)\), then \(h'(x) =\)
Q5 MVT Medium
The function \(f(x) = x^3 - 6x\) satisfies the hypotheses of the Mean Value Theorem on \([0, 3]\). Which value of \(c\) satisfies the conclusion of the MVT?
Q6 Related Rates Hard
A ladder 10 ft long rests against a vertical wall. If the bottom of the ladder slides away from the wall at a rate of 2 ft/sec, how fast is the top of the ladder sliding down the wall when the bottom of the ladder is 6 ft from the wall?
Q7 Optimization Hard
A rectangle has its base on the \(x\)-axis and two upper corners on the parabola \(y = 12 - x^2\). What is the maximum area of such a rectangle?
Q8 FTC Medium
If \(F(x) = \displaystyle\int_2^{x^2} \ln(t)\,dt\), then \(F'(x) =\)
Q9 U-Substitution Medium
\[\int \frac{2x}{x^2 + 4}\,dx =\]
Q10 Area Between Curves Medium
What is the area of the region enclosed by \(y = x^2\) and \(y = x + 2\)?
Q11 Volume of Revolution Hard
The region bounded by \(y = e^x\), \(y = 0\), \(x = 0\), and \(x = 1\) is rotated about the \(x\)-axis. The volume of the resulting solid is
Q12 Differential Equations Medium
The solution to the differential equation \(\dfrac{dy}{dx} = \dfrac{x}{y}\) with initial condition \(y(0) = 4\) is
Q13 Euler's Method Hard
Using Euler's method with step size \(h = 0.5\), approximate \(y(1)\) for the differential equation \(\dfrac{dy}{dx} = x + y\) with \(y(0) = 1\).
Q14 L'Hôpital's Rule Medium
\[\lim_{x \to 0} \frac{e^x - 1 - x}{x^2}\]
Q15 Sequences & Series (BC) Medium
Which of the following series converges?
Q16 Taylor Series (BC) Hard
The Maclaurin series for \(f(x) = xe^x\) is
Q17 Parametric (BC) Hard
A curve is defined parametrically by \(x = t^2 - 1\) and \(y = t^3 - 3t\). At which value of \(t\) does the curve have a horizontal tangent?
Q18 Polar Area (BC) Hard
The area enclosed by the polar curve \(r = 2\cos\theta\) is
Q19 Logistic Growth (BC) Hard
A population \(P\) satisfies \(\dfrac{dP}{dt} = 0.04P\!\left(1 - \dfrac{P}{500}\right)\). The population grows fastest when
Q20 Integration by Parts Hard
\[\int x \cos x\,dx =\]

🎓 Your Results

0/20
Percentage: 0%
Keep studying!
Complete Solutions & Explanations
Q1 · Limits Correct Answer: C
Evaluate \(\displaystyle\lim_{x\to 3}\dfrac{x^2-9}{x-3}\)
Step 1: Factor the numerator: \(x^2-9=(x-3)(x+3)\).
Step 2: Cancel common factor: \(\dfrac{(x-3)(x+3)}{x-3}=x+3\) for \(x\ne 3\).
Step 3: Evaluate: \(\displaystyle\lim_{x\to 3}(x+3)=3+3=\boxed{6}\)
Q2 · Continuity Correct Answer: C (k = 3)
Find \(k\) so that \(f\) is continuous at \(x=2\).
Step 1: Left-hand limit: \(\displaystyle\lim_{x\to 2^-}(x^2+1)=4+1=5\).
Step 2: Right-hand value at \(x=2\): \(f(2)=k(2)-1=2k-1\).
Step 3: For continuity, set equal: \(2k-1=5 \Rightarrow 2k=6 \Rightarrow k=\boxed{3}\).
Q3 · Differentiation (Product Rule) Correct Answer: D
Differentiate \(f(x)=x^3\sin x\).
Step 1: Apply the Product Rule: \((uv)'=u'v+uv'\) where \(u=x^3\), \(v=\sin x\).
Step 2: \(u'=3x^2\), \(v'=\cos x\).
Step 3: \(f'(x)=3x^2\sin x+x^3\cos x=\boxed{x^3\cos x+3x^2\sin x}\)
Q4 · Chain Rule Correct Answer: C
Differentiate \(h(x)=\ln(\cos x)\).
Step 1: Apply Chain Rule: \(h'(x)=\dfrac{1}{\cos x}\cdot(-\sin x)\).
Step 2: Simplify: \(h'(x)=-\dfrac{\sin x}{\cos x}=\boxed{-\tan x}\)
Q5 · Mean Value Theorem Correct Answer: B
Find \(c\in(0,3)\) satisfying MVT for \(f(x)=x^3-6x\).
Step 1: Compute average rate of change: \(\dfrac{f(3)-f(0)}{3-0}=\dfrac{(27-18)-0}{3}=\dfrac{9}{3}=3\).
Step 2: Set \(f'(c)=3\): \(3c^2-6=3 \Rightarrow 3c^2=9 \Rightarrow c^2=3 \Rightarrow c=\sqrt{3}\) (taking positive root in \((0,3)\)).
Answer: \(c=\boxed{\sqrt{3}}\)
Q6 · Related Rates Correct Answer: C
Ladder 10 ft, bottom sliding at 2 ft/sec, bottom 6 ft from wall. Find rate top slides down.
Step 1: Pythagorean relation: \(x^2+y^2=100\). Differentiate: \(2x\dfrac{dx}{dt}+2y\dfrac{dy}{dt}=0\).
Step 2: When \(x=6\): \(y=\sqrt{100-36}=8\). Given \(\dfrac{dx}{dt}=2\).
Step 3: \(2(6)(2)+2(8)\dfrac{dy}{dt}=0 \Rightarrow 24+16\dfrac{dy}{dt}=0 \Rightarrow \dfrac{dy}{dt}=-\dfrac{24}{16}=\boxed{-\dfrac{3}{2}}\) ft/sec
Q7 · Optimization Correct Answer: C (Area = 32)
Maximize area of rectangle with base on \(x\)-axis and upper corners on \(y=12-x^2\).
Step 1: Width \(=2x\), height \(=12-x^2\). Area: \(A(x)=2x(12-x^2)=24x-2x^3\).
Step 2: \(A'(x)=24-6x^2=0 \Rightarrow x^2=4 \Rightarrow x=2\).
Step 3: \(A(2)=24(2)-2(8)=48-16=\boxed{32}\). Second derivative test: \(A''(2)=-12(2)<0\), confirming maximum.
Q8 · FTC with Chain Rule Correct Answer: D
Differentiate \(F(x)=\displaystyle\int_2^{x^2}\ln(t)\,dt\).
Step 1: FTC Part 1 with Chain Rule: if upper limit is \(g(x)\), then \(F'(x)=f(g(x))\cdot g'(x)\).
Step 2: Here \(f(t)=\ln t\), \(g(x)=x^2\), \(g'(x)=2x\).
Step 3: \(F'(x)=\ln(x^2)\cdot 2x=\boxed{2x\ln(x^2)}\) (equivalently \(4x\ln x\) for \(x>0\)).
Q9 · U-Substitution Correct Answer: A
Evaluate \(\displaystyle\int\dfrac{2x}{x^2+4}\,dx\).
Step 1: Let \(u=x^2+4\), so \(du=2x\,dx\).
Step 2: Substitute: \(\displaystyle\int\dfrac{du}{u}=\ln|u|+C\).
Step 3: Back-substitute: \(\boxed{\ln|x^2+4|+C}=\ln(x^2+4)+C\) (since \(x^2+4>0\) always).
Q10 · Area Between Curves Correct Answer: C
Find area between \(y=x^2\) and \(y=x+2\).
Step 1: Intersections: \(x^2=x+2 \Rightarrow x^2-x-2=0 \Rightarrow (x-2)(x+1)=0 \Rightarrow x=-1,2\).
Step 2: On \([-1,2]\): \(x+2\ge x^2\), so \(A=\displaystyle\int_{-1}^2[(x+2)-x^2]\,dx\).
Step 3: \(=\left[\dfrac{x^2}{2}+2x-\dfrac{x^3}{3}\right]_{-1}^2=\left(2+4-\dfrac{8}{3}\right)-\left(\dfrac{1}{2}-2+\dfrac{1}{3}\right)=\dfrac{10}{3}-\left(-\dfrac{7}{6}\right)=\dfrac{20}{6}+\dfrac{7}{6}=\boxed{\dfrac{9}{2}}\)
Q11 · Volume of Revolution Correct Answer: B
Rotate \(y=e^x\), \(0\le x\le 1\) about the \(x\)-axis.
Step 1: Disk method: \(V=\pi\displaystyle\int_0^1(e^x)^2\,dx=\pi\int_0^1 e^{2x}\,dx\).
Step 2: \(=\pi\left[\dfrac{e^{2x}}{2}\right]_0^1=\pi\left(\dfrac{e^2}{2}-\dfrac{1}{2}\right)=\boxed{\dfrac{\pi(e^2-1)}{2}}\)
Q12 · Separable DE Correct Answer: C
Solve \(\dfrac{dy}{dx}=\dfrac{x}{y}\) with \(y(0)=4\).
Step 1: Separate: \(y\,dy=x\,dx\).
Step 2: Integrate both sides: \(\dfrac{y^2}{2}=\dfrac{x^2}{2}+C\).
Step 3: Apply IC: \(\dfrac{16}{2}=0+C \Rightarrow C=8\). So \(\dfrac{y^2}{2}=\dfrac{x^2}{2}+8 \Rightarrow y^2=x^2+16 \Rightarrow y=\sqrt{x^2+16}\).
Q13 · Euler's Method Correct Answer: C
Euler's method: \(\dfrac{dy}{dx}=x+y\), \(y(0)=1\), \(h=0.5\), find \(y(1)\).
Step 1 (from \(x_0=0\)): Slope \(=0+1=1\). \(y_1=1+0.5(1)=\mathbf{1.5}\). Move to \((0.5,\;1.5)\).
Step 2 (from \(x_1=0.5\)): Slope \(=0.5+1.5=2\). \(y_2=1.5+0.5(2)=\boxed{2.5}\). Answer: Choice C.
Q14 · L'Hôpital's Rule Correct Answer: B
Evaluate \(\displaystyle\lim_{x\to 0}\dfrac{e^x-1-x}{x^2}\).
Step 1: Direct substitution gives \(\dfrac{0}{0}\). Apply L'Hôpital: \(\displaystyle\lim_{x\to 0}\dfrac{e^x-1}{2x}\).
Step 2: Still \(\dfrac{0}{0}\). Apply again: \(\displaystyle\lim_{x\to 0}\dfrac{e^x}{2}=\dfrac{1}{2}\).
Alternative (Taylor): \(e^x=1+x+\dfrac{x^2}{2}+\cdots\), so \(\dfrac{e^x-1-x}{x^2}=\dfrac{x^2/2+\cdots}{x^2}\to\boxed{\dfrac{1}{2}}\)
Q15 · Series Convergence Correct Answer: D
Identify the convergent series.
A: \(\sum\dfrac{n}{n+1}\to 1\ne 0\) → Diverges by the Divergence Test.
B: \(\sum\dfrac{1}{\sqrt{n}}=\sum\dfrac{1}{n^{1/2}}\), \(p=\dfrac{1}{2}<1\) → Diverges (p-series).
C: \(\sum\dfrac{1}{n}\) — the harmonic series → Diverges.
D: \(\sum\dfrac{1}{n^2}\), \(p=2>1\) → Converges (p-series). ✓ Answer: \(\boxed{D}\)
Q16 · Taylor/Maclaurin Series Correct Answer: A
Find the Maclaurin series for \(f(x)=xe^x\).
Step 1: Recall \(e^x=\displaystyle\sum_{n=0}^{\infty}\dfrac{x^n}{n!}\).
Step 2: Multiply both sides by \(x\): \(xe^x=x\cdot\displaystyle\sum_{n=0}^{\infty}\dfrac{x^n}{n!}=\sum_{n=0}^{\infty}\dfrac{x^{n+1}}{n!}\).
Note on C: \(\displaystyle\sum_{n=1}^{\infty}\dfrac{x^n}{(n-1)!}\) — let \(m=n-1\): \(=\displaystyle\sum_{m=0}^{\infty}\dfrac{x^{m+1}}{m!}\). This is the same as A. Both A and C are equivalent; the given form in A starts at \(n=0\). Answer: A
Q17 · Parametric Curves Correct Answer: C
Find \(t\) where \(x=t^2-1\), \(y=t^3-3t\) has a horizontal tangent.
Step 1: Horizontal tangent requires \(\dfrac{dy}{dt}=0\) and \(\dfrac{dx}{dt}\ne 0\).
Step 2: \(\dfrac{dy}{dt}=3t^2-3=3(t^2-1)=0 \Rightarrow t=\pm 1\).
Step 3: Check \(\dfrac{dx}{dt}=2t\): at \(t=\pm 1\), \(2t=\pm 2\ne 0\). ✓ Horizontal tangents at \(t=\boxed{\pm 1}\).
Q18 · Polar Area Correct Answer: C
Find the area enclosed by \(r=2\cos\theta\).
Step 1: \(r=2\cos\theta\) is a circle of radius 1 centered at \((1,0)\). Its area should be \(\pi(1)^2=\pi\).
Step 2 (via integration): The curve traces from \(\theta=-\pi/2\) to \(\theta=\pi/2\). \(A=\dfrac{1}{2}\displaystyle\int_{-\pi/2}^{\pi/2}(2\cos\theta)^2\,d\theta=2\int_{-\pi/2}^{\pi/2}\cos^2\theta\,d\theta\).
Step 3: \(=2\displaystyle\int_{-\pi/2}^{\pi/2}\dfrac{1+\cos 2\theta}{2}\,d\theta=\int_{-\pi/2}^{\pi/2}(1+\cos 2\theta)\,d\theta=\left[\theta+\dfrac{\sin 2\theta}{2}\right]_{-\pi/2}^{\pi/2}=\pi-0=\boxed{\pi}\)
Q19 · Logistic Growth Correct Answer: B
Logistic equation: \(\dfrac{dP}{dt}=0.04P\!\left(1-\dfrac{P}{500}\right)\). When does growth rate peak?
Step 1: The logistic model grows fastest at the inflection point, which occurs at \(P=\dfrac{L}{2}\).
Step 2: The carrying capacity \(L=500\), so the inflection occurs at \(P=\dfrac{500}{2}=\boxed{250}\).
Verification: Let \(g(P)=0.04P(1-P/500)\). \(g'(P)=0.04(1-P/250)=0\) when \(P=250\). ✓
Q20 · Integration by Parts Correct Answer: B
Evaluate \(\displaystyle\int x\cos x\,dx\).
Step 1: IBP: \(u=x\) → \(du=dx\); \(dv=\cos x\,dx\) → \(v=\sin x\).
Step 2: \(\int x\cos x\,dx = x\sin x - \int\sin x\,dx = x\sin x-(-\cos x)+C\).
Step 3: \(=\boxed{x\sin x+\cos x+C}\)