- #1

- 20

- 0

## Homework Statement

$$\frac{dy}{dx}+y=\left\{\begin{matrix}1, \ 0\leq x< 1

\\

0, \ x\ge1 \ \ \ \ \ \ \

\end{matrix}\right.$$

## Homework Equations

## The Attempt at a Solution

$$P(x)=1$$

__Integrating factor__##=e^{x}##

For ##f(x)=1##:

$$\frac{d}{dx}[e^{x}y]=e^{x}$$

Integrating both sides:

$$e^{x}y=e^{x}+C$$

$$y=1+\frac{C}{e^{x}}, y(0)=1$$

$$C=0$$

$$\fbox{y=1}$$

For ##f(x)=0##:

$$\frac{d}{dx}[e^{x}y]=0$$

Integrating both sides:

$$e^{x}y=C$$

$$y=\frac{C}{e^{x}}, y(0)=1$$

$$C=1$$

##y=\frac{1}{e^{x}}## <-- This one is coming back incorrect

I have worked through this problem multiple times, but my WeBWorK assignment keeps saying the second solution, the one for ##f(x)=0## is incorrect. I can't figure out what I'm doing wrong?! Any help would be greatly appreciated!