$\left(x^{3}+x^{2}+x+1\right) \frac{d y}{d x}=2 x^{2}+x ; y=1$ when $x=0$
The given differential equation is:
$\left(x^{3}+x^{2}+x+1\right) \frac{d y}{d x}=2 x^{2}+x$
$\Rightarrow \frac{d y}{d x}=\frac{2 x^{2}+x}{\left(x^{3}+x^{2}+x+1\right)}$
$\Rightarrow d y=\frac{2 x^{2}+x}{(x+1)\left(x^{2}+1\right)} d x$
Integrating both sides, we get:
$\int d y=\int \frac{2 x^{2}+x}{(x+1)\left(x^{2}+1\right)} d x$ ...(1)
Let $\frac{2 x^{2}+x}{(x+1)\left(x^{2}+1\right)}=\frac{A}{x+1}+\frac{B x+C}{x^{2}+1}$. ...(2)
$\Rightarrow \frac{2 x^{2}+x}{(x+1)\left(x^{2}+1\right)}=\frac{A x^{2}+A+(B x+C)(x+1)}{(x+1)\left(x^{2}+1\right)}$
$\Rightarrow 2 x^{2}+x=A x^{2}+A+B x^{2}+B x+C x+C$
$\Rightarrow 2 x^{2}+x=(A+B) x^{2}+(B+C) x+(A+C)$
Comparing the coefficients of $x^{2}$ and $x$, we get:
A + B = 2
B + C = 1
A + C = 0
Solving these equations, we get:
$A=\frac{1}{2}, B=\frac{3}{2}$ and $C=\frac{-1}{2}$
Substituting the values of A, B, and C in equation (2), we get:
$\frac{2 x^{2}+x}{(x+1)\left(x^{2}+1\right)}=\frac{1}{2} \cdot \frac{1}{(x+1)}+\frac{1}{2} \frac{(3 x-1)}{\left(x^{2}+1\right)}$
Therefore, equation (1) becomes:
$\int d y=\frac{1}{2} \int \frac{1}{x+1} d x+\frac{1}{2} \int \frac{3 x-1}{x^{2}+1} d x$
$\Rightarrow y=\frac{1}{2} \log (x+1)+\frac{3}{2} \int \frac{x}{x^{2}+1} d x-\frac{1}{2} \int \frac{1}{x^{2}+1} d x$
$\Rightarrow y=\frac{1}{2} \log (x+1)+\frac{3}{4} \cdot \int \frac{2 x}{x^{2}+1} d x-\frac{1}{2} \tan ^{-1} x+\mathrm{C}$
$\Rightarrow y=\frac{1}{2} \log (x+1)+\frac{3}{4} \log \left(x^{2}+1\right)-\frac{1}{2} \tan ^{-1} x+\mathrm{C}$
$\Rightarrow y=\frac{1}{4}\left[2 \log (x+1)+3 \log \left(x^{2}+1\right)\right]-\frac{1}{2} \tan ^{-1} x+\mathrm{C}$
$\Rightarrow y=\frac{1}{4}\left[(x+1)^{2}\left(x^{2}+1\right)^{3}\right]-\frac{1}{2} \tan ^{-1} x+\mathrm{C}$ ...(3)
Now, $y=1$ when $x=0$
$\Rightarrow \mathrm{I}=\frac{1}{4} \log (\mathrm{l})-\frac{1}{2} \tan ^{-1} 0+\mathrm{C}$
$\Rightarrow \mathrm{I}=\frac{1}{4} \times 0-\frac{1}{2} \times 0+\mathrm{C}$
$\Rightarrow \mathrm{C}=1$
Substituting C = 1 in equation (3), we get:
$y=\frac{1}{4}\left[\log (x+1)^{2}\left(x^{2}+1\right)^{3}\right]-\frac{1}{2} \tan ^{-1} x+1$