Question

-2x(y-1) = dy/dx solution y=1+Ae^{-x^2}

Original question: -2x(y-1) = \frac{dy}{dx} -2x,dx = \frac{1}{y-1},dy -x^2 + c = \ln(y-1) e^{-x^2} \times e^c = |y-1| A = \pm e^c A e^{-x^2} = y-1 y = 1 + A e^{-x^2} (when A=0)

Expert Verified Solution

thumb_up100%(1 rated)

Key takeaway: This is a separable differential equation. Separate the variables, integrate both sides, and solve for yy carefully, keeping track of the constant of integration.

Start with

2x(y1)=dydx.-2x(y-1)=\frac{dy}{dx}.

Step 1: Separate variables

Divide by y1y-1 and multiply by dxdx:

1y1dy=2xdx.\frac{1}{y-1}\,dy=-2x\,dx.

Step 2: Integrate both sides

1y1dy=2xdx.\int \frac{1}{y-1}\,dy=\int -2x\,dx.

This gives

lny1=x2+C.\ln|y-1|=-x^2+C.

Step 3: Exponentiate

y1=ex2+C=eCex2.|y-1|=e^{-x^2+C}=e^C e^{-x^2}.

Let A=eCA=e^C, where AA can absorb the sign as well, so

y1=Aex2.y-1=Ae^{-x^2}.

Therefore,

y=1+Aex2.\boxed{y=1+Ae^{-x^2}}.

Step 4: Check the special case

If A=0A=0, then y=1y=1, which also satisfies the differential equation.


Pitfalls the pros know 👇 A common mistake is to forget the absolute value after integrating 1y1\frac{1}{y-1}. Another issue is treating the constant as only positive; after exponentiating, the solution constant should be allowed to be any real number in the final form.

What if the problem changes? If the equation were dydx=2x(y1)\frac{dy}{dx}=2x(y-1) instead, the exponential would become ex2e^{x^2} instead of ex2e^{-x^2}, so the sign in the exponent matters.

Tags: separable differential equation, integration, initial value

chat