e^(x-y)=-x+C where y(2)=2

so I found C=3?

y=_____________

so I thought it would be y=-ln(-x+3)-x but that is wrong please help!

since y(2) = 2,

e^(2-2) = -2+c
1 = -2+c
3 = c
So far, so good.

e^(x-y) = -x+3
x-y = ln(-x+3)
y = x-ln(-x+3)

Somehow you got an extra "-" sign in there

Thank you!

To solve the given differential equation, you can use the method of separation of variables. Here's how you can do it step by step:

Step 1: Begin with the given differential equation: e^(x-y) = -x + C.

Step 2: Rearrange the equation to isolate the dependent variable y. Start by taking the natural logarithm (ln) of both sides:

ln(e^(x-y)) = ln(-x + C).

Simplifying the left side using the logarithmic property (ln(e^a) = a), we get:

x - y = ln(-x + C).

Step 3: Rearrange the equation to solve for y. Move the x term to the right side:

-y = ln(-x + C) - x.

Multiply both sides by -1 to isolate y:

y = -ln(-x + C) + x.

Step 4: Now you need to determine the value of C by using the initial condition y(2) = 2. Substitute x = 2 and y = 2 into the equation:

2 = -ln(-2 + C) + 2.

Step 5: Simplify the equation and solve for C. Start by subtracting 2 from both sides:

-2 = -ln(-2 + C).

Next, take the exponential function (e) of both sides to eliminate the logarithm:

e^(-2) = -2 + C.

Using the property (e^(ln(a)) = a), we have:

1/e^2 = -2 + C.

Adding 2 to both sides:

C = 1/e^2 + 2.

Step 6: Substitute the value of C back into the equation:

y = -ln(-x + 1/e^2 + 2) + x.

Therefore, the correct expression for y is:

y = -ln(-x + 1/e^2 + 2) + x.

Please ensure that you follow the steps and calculations carefully to arrive at the correct result.