Writing equivalent first order differential equation and initial condition

3.3k Views Asked by At

I have another homework question that I'm struggling a bit to understand exactly what I'm asked to do. I understand what an initial condition is, but I'm not quite sure how I specify such a condition. So, here's the problem:

$y = -1 + \int_1^x{(t - y(t)) dt}$

I am supposed to write an equivalent first order differential equation and specify an initial condition. I worked out the first part and my first order differential equation is:

$\frac{dy}{dx} = x - y$

However, understanding how to specify the initial condition has me stumped. All of the examples in the section specify the condition. As I write this question, it occurs to me that perhaps I must solve my differential equation. Doing so produces:

$$ \begin{array}{rcl}\frac{dy}{dx} & = & x - y \\ dy + y & = & xdx \\ \int{y+1 dy} & = & \int{x dx} \\ y^2 + 2y & = & x^2 \end{array} $$

However, this doesn't seem to be right either (or I'm just missing it). It would seem that I must know what the definition of $y$ is for this to work. Indeed, it would seem that such a definition is provided at the outset: namely $y = -1 + \int_1^x{(t - y(t)) dt}$. Yet, I'm not sure how to integrate $y(t)$.

At any rate, this also happens to be an odd numbered problem and so I already know what the authors got, but I don't quite see how to get it.

Thanks for the help, Andy

1

There are 1 best solutions below

2
On BEST ANSWER

Hint: What happens to the RHS when $x=1$?

The following is the error in your solution to the differential equation $$\int y+dy \neq \int(y+1)dy$$

Here is a correct solution:

$$\frac{dy}{dx}=x-y \implies \frac{dy}{dx}+y=x$$ Multiply through by the integrating factor $e^{\int1dx}=e^{x}$, to get $$e^{x}\frac{dy}{dx}+e^{x}y=\frac{d}{dx}(ye^{x})=xe^{x}$$ Integrating, $$ye^{x}=\int xe^{x}dx=xe^{x}-\int e^{x}dx=xe^{x}-e^{x}+c$$ In other words, $y=x-1+ce^{-x}$
Combined with the initial condition of $(0,-1)$, $c=0 \implies y=x-1$