36. $(1 + x^{2})\frac{dy}{dx}+2xy = f(x); y(0) = 0, where\n$f(x)=\begin{cases}x, & 0leq x<1\\-x, &…

36. $(1 + x^{2})\frac{dy}{dx}+2xy = f(x); y(0) = 0, where\n$f(x)=\begin{cases}x, & 0leq x<1\\-x, & xgeq1end{cases}$

36. $(1 + x^{2})\frac{dy}{dx}+2xy = f(x); y(0) = 0, where\n$f(x)=\begin{cases}x, & 0leq x<1\\-x, & xgeq1end{cases}$

Answer

Explanation:

Step1: Identify the type of differential equation

The given equation ((1 + x^{2})\frac{dy}{dx}+2xy = f(x)) can be written in the form (\frac{dy}{dx}+\frac{2x}{1 + x^{2}}y=\frac{f(x)}{1 + x^{2}}), which is a first - order linear differential equation of the form (\frac{dy}{dx}+P(x)y = Q(x)), where (P(x)=\frac{2x}{1 + x^{2}}) and (Q(x)=\frac{f(x)}{1 + x^{2}}).

Step2: Find the integrating factor

The integrating factor (I.F.=e^{\int P(x)dx}). Now, (\int\frac{2x}{1 + x^{2}}dx=\ln(1 + x^{2})), so (I.F.=e^{\ln(1 + x^{2})}=1 + x^{2}).

Step3: General solution of the differential equation

The general solution of the first - order linear differential equation (\frac{dy}{dx}+P(x)y = Q(x)) is (y\times(I.F.)=\int Q(x)\times(I.F.)dx + C). Substituting (I.F. = 1 + x^{2}) and (Q(x)=\frac{f(x)}{1 + x^{2}}), we get (y(1 + x^{2})=\int f(x)dx + C).

Step4: Solve for (C) using the initial condition (y(0)=0)

When (x = 0), (y = 0). Substituting into (y(1 + x^{2})=\int f(x)dx + C), we have (0=\int_{0}^{0}f(x)dx + C), so (C = 0). Then (y=\frac{\int f(x)dx}{1 + x^{2}}).

Step5: Calculate (\int f(x)dx) for different intervals

For (0\leq x<1), (\int f(x)dx=\int xdx=\frac{x^{2}}{2}+C_1). Since (C = 0) from the initial condition and when (x = 0) the integral is (0), (C_1 = 0). For (x\geq1), (\int f(x)dx=\int_{0}^{1}x dx+\int_{1}^{x}-t dt=\frac{1}{2}-\left[t^{2}/2\right]_{1}^{x}=\frac{1}{2}-\frac{x^{2}}{2}+\frac{1}{2}=1-\frac{x^{2}}{2}).

So the solution is (y=\begin{cases}\frac{x^{2}}{2(1 + x^{2})},&0\leq x<1\\frac{1-\frac{x^{2}}{2}}{1 + x^{2}},&x\geq1\end{cases})

Answer:

(y=\begin{cases}\frac{x^{2}}{2(1 + x^{2})},&0\leq x<1\\frac{1-\frac{x^{2}}{2}}{1 + x^{2}},&x\geq1\end{cases})