The given differential equation is:
\[
\frac{dy}{dx} + y = x
\]
This is a first-order linear differential equation. To solve this, we will use the integrating factor method.
The general form of a first-order linear differential equation is:
\[
\frac{dy}{dx} + P(x)y = Q(x)
\]
Here, \( P(x) = 1 \) and \( Q(x) = x \).
The integrating factor \( \mu(x) \) is given by:
\[
\mu(x) = e^{\int P(x) \, dx} = e^{\int 1 \, dx} = e^x
\]
Now, multiply both sides of the original equation by the integrating factor \( e^x \):
\[
e^x \frac{dy}{dx} + e^x y = x e^x
\]
This simplifies to:
\[
\frac{d}{dx} \left( e^x y \right) = x e^x
\]
Next, integrate both sides with respect to \( x \):
\[
\int \frac{d}{dx} \left( e^x y \right) \, dx = \int x e^x \, dx
\]
The left side is simply \( e^x y \), and for the right side, we use integration by parts:
\[
\int x e^x \, dx = e^x (x - 1) + C
\]
Thus, we have:
\[
e^x y = e^x (x - 1) + C
\]
Now, solve for \( y \):
\[
y = x - 1 + C e^{-x}
\]
We are given the initial condition \( y(0) = 0 \). Substituting \( x = 0 \) and \( y(0) = 0 \) into the equation:
\[
0 = 0 - 1 + C e^{0}
\]
\[
C - 1 = 0 \quad \Rightarrow \quad C = 1
\]
Thus, the solution to the differential equation is:
\[
y = x - 1 + e^{-x}
\]
Finally, we need to find \( y(1) \):
\[
y(1) = 1 - 1 + e^{-1} = \frac{1}{e}
\]
Thus, the value of \( y(1) \) is \( \boxed{\frac{1}{e}} \).