Solve dy/dx=(y+x^2-2)/(x+1) ,y(0)=2 ??

2 Answers
Mar 31, 2018

dy/dx=0

Explanation:

The key to solving this problem is understanding what it means. The expression y(0)=2 tells us that y=2 when x=0. Knowing this, it's fairly simple to solve the equation by substituting x and y with their values.

dy/dx=(y+x^2-2)/(x+1)

dy/dx=(2+0^2-2)/(0+1)=0/1=0

This tells us that the derivative of y with respect to x equals 0 when y = 2 and x = 0.

Mar 31, 2018

y(x) = (x+1)^2-2(x+1)ln|x+1|+1

Explanation:

dy/dx = (y+x^2-2)/(x+1) implies

dy/dx - y/(x+1) = (x^2-2)/(x+1)

This is a linear first order differential equation of the form

dy/dx+P(x)y = Q(x)

where P(x) = -1/(x+1) and Q(x)=(x^2-2)/(x+1). It is well known that such an equation admits of an integrating factor given by

exp(int P(x) dx) = exp(-int dx/(x+1)) = exp(-ln(x+1)) = 1/(x+1)

Multiplying both sides of the equation by this factor gives us

1/(x+1) dy/dx - y/(x+1)^2 = (x^2-2)/(x+1)^2

Now, the left hand side is

1/(x+1) dy/dx + d/dx( 1/(x+1)) y = d/dx(y/(x+1))

On the other hand

(x^2-2)/(x+1)^2 = (x^2color(red)(+2x+1)color(blue)(-2x-1)-2)/(x+1)^2
qquad = ((x+1)^2-2(x+1)-1)/(x+1)^2 = 1-2/(x+1)-1/(x+1)^2

Thus, the equation becomes

d/dx(y/(x+1)) = 1-2/(x+1)-1/(x+1)^2

Integration with respect to x yields

y/(x+1) = x-2ln|x+1|+1/(x+1)+C

The constant of integration C can be determined by using the initial condition y(0) = 2 :

2/(color(red)0+1) = color(red)0-2ln|color(red)0+1|+1/(color(red)0+1)+C implies C=1

Thus, the solution is

y/(x+1) = x-2ln|x+1|+1/(x+1)+1

or

y(x) = (x+1)^2-2(x+1)ln|x+1|+1