So I need to solve this differential equation

dy/dx = 1/(x+2)

so i solved it like this

dy = 1/(x+2)dx

then i took the integral of both sides

y= ⌠1/(x+2)dx

then performed a u sub

u = x+2

du = 1dx

y = ⌠du/u

y = ln abs(u)+c

y = ln abs(x+2)+c

but the sanswer is supposed to be

y = ln abs ((x+2)/2) + c

Where did I mess up? and where did the 2 in the denominatior of the (x+2) come from?

Not sure where the 2 came from, but since

ln(u/2) = ln(u) - ln(2)

just fold the ln(2) into the C.

okay thank you!

i don't know answer.i am tring to find answer

To solve the differential equation, you started correctly by separating the variables:

dy = 1/(x+2) dx.

Then you integrated both sides with respect to their respective variables:

∫ dy = ∫ 1/(x+2) dx.

However, it seems you made a mistake during the integration. Let's correct it:

∫ dy = ∫ 1/(x+2) dx,

Integrating the left side gives:

y + C1 = ∫ dx.

The integral of dx is simply x, so we have:

y + C1 = x + C2.

Combining the constants of integration, we can write this as:

y = x + (C2 - C1).

Now let's address the discrepancy between your answer (ln |x+2| + C) and the expected answer (ln |(x+2)/2| + C).

In your solution, you considered the substitution u = x+2, which is correct. The differential du = dx. However, your mistake lies in the substitution of du without adjusting the limits of integration.

When you initially set up the integral:

∫ du/u,

you have to account for the change in variables and adjust the limits accordingly. The original limits of integration will change when substituting u = x+2.

The original limits for x were -2 to x. Substituting u = x+2, the new limits become u(-2) to u(x), which are 0 to (x+2).

Therefore, you need to rewrite the definite integral as follows:

∫[0 to (x+2)] du/u.

Now integrating this expression gives:

ln |u| + C3.

Substituting back u = x+2:

ln |x+2| + C3.

Let's denote C3 = C - ln|2|. Then we have:

ln |x+2| + C - ln|2| = ln |x+2| + C',

where C' = C - ln|2| is a new constant.

Hence, the correct solution is:

y = ln |x+2| + C',

which matches the expected answer: ln |(x+2)/2| + C.