Solving linear differential equation with variable coefficients. I have faced this task, when preparing to my university's "mathematical methods" exam, and I do not really understand how to solve it. The task content is as follows:
Given: $$(1-x^2)\cdot y''_{xx} -x\cdot y'_x +y = \frac{\sqrt{1-x^2}}{x}$$ Solve the equation by substituion of the independent variable: $x(t) = \cos(t), x\in(0,1).$
My attempt:
I have performed the suggested substitution:

*

*$(1-\cos^{2}(t))\cdot \large\frac{\partial^2y}{\partial x(t)^2}\normalsize-\cos(t)\cdot\large\frac{\partial y}{\partial x(t)} \normalsize+ y = \large\frac{\sqrt{1-\cos^2(t)}}{cos(t)}.$

*$\sin^2(t)\cdot \large\frac{\partial^2y}{\partial x(t)^2}\normalsize-\cos(t)\cdot\large\frac{\partial y / \partial t}{\partial x / \partial t} \normalsize+ y = \tan(t).$

*$\sin^2(t)\cdot\frac{\large\partial\left(\frac{\dot{y}}{-\sin(t)}\right) / \partial t}{\large\partial x / \partial t} + \large\frac{\cos(t)}{\sin(t)}\normalsize\dot{y} + y = \tan(t).$

*$-\ddot{y} + 2\dot{y}\cot(t) +y = \tan(t).$
That is now I have to solve: $-\ddot{y} + 2\dot{y}\cot(t) +y = \tan(t).$ And that is the point, where I am stuck, I have no idea how to proceed from here, and I did not manage to find the way to solve such a linear D.E. in my course book.
I would appreciate any help, hints or book references, thank you in advance!
Post Scriptum:
As correctly mentioned by @Aryadeva, I have made a mistake, when calculating $\large\frac{\partial^2 y}{\partial x^2}$, I simply lost "minus".
That is, after recalculating I had to solve: $$\ddot{y} + y = \tan(t), \text{ s.t. } x\in(0,1) \text{ and } x = \cos(t) \Leftrightarrow \forall x\in \mathbb{D}_x: \text{ }t = \arccos{x}.\tag{1}$$
My solution has involved appying vatiation of parameters method:
$\underline{\text{Step I}}$: find characteristic polynomial over $y(t)$ to get a general solution $(\large y_{\small G})$ for $(1)$:
$\lambda^2 + 1 = 0. \Rightarrow \lambda = \pm i.$
$\begin{bmatrix}
\lambda_1\\
\lambda_2\\
\end{bmatrix} = \begin{bmatrix}
i\\
-i\\
\end{bmatrix} \Rightarrow \large y_{\small G} \normalsize = C_1 e^{it}+C_2 e^{-it} = \dot{\tilde {C}}_1\cos(t) + \dot{\tilde{C}}_2 \sin(t).$
$\underline{\text{Step II}}$: Finding particular solution $(\large y_{\small P})$ for $(1)$, using Wronskian matrices:
I would omit my calculations here, would just note that for the given D.E.:
$\mathbb{W} = \begin{pmatrix}\cos(t) & \sin(t) \\ -\sin(t) & \cos(t) \end{pmatrix}, \mathbb{W}_{\small \Delta} = \begin{vmatrix}\cos(t) & \sin(t) \\ -\sin(t) & \cos(t) \end{vmatrix} = 1.$
$\mathbb{W}_{\small \Delta,\normalsize 1} = \begin{vmatrix}0 & \sin(t) \\ 1 & \cos(t) \end{vmatrix} = -\sin(t), \mathbb{W}_{\small \Delta,\normalsize 2} = \begin{vmatrix}\cos(t) & 0 \\ -\sin(t) & 1 \end{vmatrix} = \cos(t).$
Thus:
$$\dot{\tilde{C}}_1(t) = \int\frac{\tan(t)\cdot \mathbb{W}_{\small \Delta,\normalsize 1}}{\mathbb{W}_{\small \Delta}} \partial t = \sin(t) +\frac{1}{2}\ln\left(\frac{\sin(t)-1}{\sin(t)+1}\right) +\bar{C}_1,$$
$$\dot{\tilde{C}}_2(t) = \int\frac{\tan(t)\cdot \mathbb{W}_{\small \Delta,\normalsize 2}}{\mathbb{W}_{\small \Delta}} \partial t = -\cos(t) + \bar{C}_2.$$
Thereof:
$$\large y_{\small P} \normalsize = \left(\sin(t)+\frac{1}{2}\ln\left(\frac{\sin(t)-1}{\sin(t)+1}\right) +\bar{C}_1\right)\cos(t) +\left(-\cos(t) +\bar{C}_2\right)\sin(t).$$
$\underline{\text{Step III}}$: Now it just suffices to write down the whole solution and transfer from $t$ to $x$:

*

*$\large y \normalsize (t) = \large y_{\small G} + y_{\small P} \normalsize = \left(\sin(t)+\frac{1}{2}\ln\left(\frac{\sin(t)-1}{\sin(t)+1}\right) +\tilde{C}_1\right)\cos(t) +\left(-\cos(t) +\tilde{C}_2\right)\sin(t).$
Now, as $x \in (0, 1): \cos(\arccos{x}) = x, \text{ }\sin(\arccos{x}) = \sqrt{1-x^2}:$
$$\text{Answer: } \begin{array}{|c|}
\hline
y(x) = \left(\sqrt{1-x^2} + \frac{1}{2}\ln\left(\frac{\sqrt{1-x^2} - 1}{\sqrt{1-x^2} +1}\right)+\tilde{C}_1 \right)x +\left(-x+\tilde{C}_2\right)\sqrt{1-x^2}.\\
\hline
\end{array}$$

$$(1-x^2)\cdot y''_{xx} -x\cdot y'_x +y = \frac{\sqrt{1-x^2}}{x}$$
I don't know about the given hint but you can rewrite the DE as:
$$((1-x^2)\cdot y')'+(xy)' = \frac{\sqrt{1-x^2}}{x}$$
Integrate.

Note that we have:
$$x\dfrac {dy}{dx}=\cos t \dfrac {dy}{dt}\dfrac {dt}{dx}=-y'_t\dfrac {\cos t}{\sin t}$$
so that you have $$\dfrac {dy}{dx}=-\dfrac {dy}{dt}\dfrac 1 {\sin t}$$
Then you calculate $(1-x^2)y''_{xx}$
You should get:
$$y''_{tt}-y'_{t}\dfrac {\cos t }{\sin t}$$
This simplify your differential equation.
$$y''_{tt}+y=\tan t$$
It seems to me that you made a mistake when you calculated $y''_{tt}$.
