I have this limit which I "must" solve with Taylor series but I don't really know where I am wrong and how the result comes out...
$$\lim_{x\to 0^+} \frac{\ln(1 + \sqrt{1-\cos(x)})}{1-e^{\sin(3x)}}$$
The result is $-\frac{1}{3\sqrt{2}}$.
Now here is what I have done, even if it's a disaster.
Starting with the denominator, I expand the exponential, and then the argument up to second orders:
$$ \begin{align} e^{\sin(3x)} & = 1 + \sin(3x) + \frac{1}{2}\sin^2(3x) + o(\sin^2(3x)) \\\\ & = 1 + \left[3x + o(x^2)\right] + \frac{1}{2}\left[x + o(x)\right]^2 + o (x^2) \\\\ & = 1 + 3x + \frac{1}{2}x^2 + o(x^2) \end{align} $$
Now the logarithm: I use Taylor series for the logarithm
$$ \begin{align} \ln(1 + \sqrt{1-\cos(x)}) = \sqrt{1-\cos(x)} - \frac{1}{2}(1-\cos(x)) + o(1-\cos(x)) \end{align} $$
Then I expand by using $(1 + z)^{\alpha}$ where $\alpha = 1/2$ and lastly the cosine:
$$ \begin{align} & \Big(1 - \frac{1}{2}\cos(x) + \frac{3}{8}\cos^2(x) + o(\cos^2(x))\Big) - \frac{1}{2} + \frac{1}{2}\cos(x) + o(x^2) \\\\ & = \frac{1}{2} + \frac{3}{8}\cos^2(x) + o(x^2) \\\\ & = \frac{1}{2} + \frac{3}{8}\left(1 - \frac{x^2}{2} + o(x^2)\right)^2 + o(x^2) \\\\ & = \frac{1}{2} + \frac{3}{8} \left(1 - x^2 + o(x^2)\right) \\\\ & = \frac{7}{8} + \frac{3x^2}{8} + o(x^2) \end{align} $$
Now when substituting:
$$\lim_{x\to 0^+} \frac{\ln(1 + \sqrt{1-\cos(x)})}{1-e^{\sin(3x)}} = \lim_{x\to 0^+} \frac{\frac{7}{8} + \frac{3x^2}{8} + o(x^2)}{-3x - \frac{1}{2}x^2 + o(x^2)}$$
Using the $o(x)$ algebra, hence collecting $x^2$ so $\frac{o(x^2)}{x^2} \to 0$:
$$\lim_{x\to 0^+} \frac{x^2\left(\frac{7}{8x^2} + 3 + \frac{o(x^2)}{x^2}\right)}{x^2 \left(-\frac{3}{x} - \frac{1}{2} + \frac{o(x^2)}{x^2}\right)} = \lim_{x\to 0^+} \frac{\frac{7}{8x^2} + 3}{-\frac{3}{x}-\frac{1}{2}} = \lim_{x\to 0^+} \frac{\frac{7 + 24 x^2}{8x^2}}{\frac{-6-x}{2x}}$$
This surely doesn't go to $-\frac{1}{3\sqrt{2}}$.
I tried this really $7-8$ times and I keep getting wrong resuslts.
Any help? Thank you!
When you are doing Taylor expansions, it is very important to stick with one $o(f(x))$ and stick to it, meaning eliminating everything negligible compared to $f(x)$.
Here you have some mixed $o(\sin(x)^2)$ and $o(1-\cos(x))$, it would be better to expand them in $o(x^n)$ before proceeding to $\exp,\ln$ and $\sqrt{}$ expansions.
Note that I do not use $|x|$ below since $x\to 0^+$, so I use $x$ instead.
$\begin{align}\ln(1+\sqrt{1-\cos(x)}) &=\ln(1+\sqrt{\frac 12x^2+o(x^2)})\\ &=\ln(1+\frac x{\sqrt{2}}\sqrt{1+o(1)})\\ &=\ln(1+\frac x{\sqrt{2}}(1+o(1))\\ &=\ln(1+\frac x{\sqrt{2}}+o(x))\\ &=\frac x{\sqrt{2}}+o(x) \end{align}$
$\begin{align}1-\exp(\sin(3x))&=1-\exp(3x+o(x))\\&=1-(1+3x+o(x))\\&=-3x+o(x)\end{align}$
And you get a limit in $-\frac 1{3\sqrt{2}}$