# Initial value problem

$$\frac{dy}{dx}=x-4-xy-4y$$
you are given that $y(0)=4$.

so, here's what i did:
$$\frac{dy}{dx}=(x-4)(y+1)$$

$$\frac{dy}{y+1}=(x-4)dx$$

i integrated both sides:
$$ln(y+1)=\frac{x^2}{2}-4x+C$$

$$y=e^{\frac{x^2}{2}}e^{-4x}e^{C}-1$$

plugged in for x and y:
$$4=e^{\frac{0^2}{x}}e^{-4*0}e^{C}-1$$

$$5=e^C$$

so:
$$y=5e^{\frac{x^2}{x}}e^{-4x}$$

i know that's wrong, and i need help working it out. that's what i have so far though.

dextercioby
Homework Helper
The initial formula (when u restrained into a product of quantities in round brackets) is incorrect.

You may wanna check again.

Daniel.

HallsofIvy
Homework Helper
In other words, you factored wrong

x- 4- xy- 4y is not (x- 4)(y+1)= x- 4+ xy- 4y.

dextercioby
Homework Helper
The bad news that the solution to this Cauchy problem,according to my version of Maple,is not pretty,not pretty at all...

Are u sure this is the equation u were supposed to solve...?

Daniel.

nah, i didnt factor wrong. i just wrote down the equation wrong.
$$\frac{dy}{dx}=x-4+xy-4y$$

try that one?

dextercioby
Homework Helper
It's something else.In this case,your initial factoring turns out to be correct (in this case!) and so the solution is obtained the way you did.Unfortunately,after computing that integration constant,when writing the final solution,you made a mistake.Can u "fix" it...?

Daniel.

$$y=5e^{\frac{x^2}{x}}e^{-4x}-1$$
maybe? haha, im fairly tired and at work. im missing a lot of things.

dextercioby