Integral Tan
1. **State the problem:** Evaluate the definite integral $$\int_0^{\frac{\pi}{4}} \tan(x) \, dx.$$\n\n2. **Recall the formula:** The integral of $$\tan(x)$$ is $$-\ln|\cos(x)| + C$$ because $$\tan(x) = \frac{\sin(x)}{\cos(x)}$$ and integrating gives $$\int \tan(x) \, dx = -\ln|\cos(x)| + C.$$\n\n3. **Apply the definite integral limits:**\n$$\int_0^{\frac{\pi}{4}} \tan(x) \, dx = \left[-\ln|\cos(x)|\right]_0^{\frac{\pi}{4}} = -\ln|\cos(\frac{\pi}{4})| + \ln|\cos(0)|.$$\n\n4. **Evaluate the cosine values:**\n$$\cos\left(\frac{\pi}{4}\right) = \frac{\sqrt{2}}{2}, \quad \cos(0) = 1.$$\n\n5. **Substitute and simplify:**\n$$-\ln\left(\frac{\sqrt{2}}{2}\right) + \ln(1) = -\ln\left(\frac{\sqrt{2}}{2}\right) + 0 = -\ln\left(\frac{\sqrt{2}}{2}\right).$$\n\n6. **Rewrite the logarithm:**\n$$-\ln\left(\frac{\sqrt{2}}{2}\right) = -\ln\left(2^{-\frac{1}{2}}\right) = -\left(-\frac{1}{2} \ln 2\right) = \frac{1}{2} \ln 2.$$\n\n**Final answer:**\n$$\int_0^{\frac{\pi}{4}} \tan(x) \, dx = \frac{1}{2} \ln 2.$$