# First order differential equation

Im clueless on how to solve the following question...

$xe^y\frac {dy}{dx} = e^y +1$

What i've done is...

$\frac {dy}{dx} = \frac 1x + \frac {1}{xe^e}; \frac {dy}{dx} - \frac {1}{xe^e} = \frac 1x$

Find the integrating factor..

$v(x) = e^{P(x)}; where P(x) = \int p(x)dx \Rightarrow P(x) = \int \frac 1x dx = ln|x| \\v(x) = e^{P(x)} = e^{ln|x|} = x; \\ y = \frac {1}{v(x)} \int v(x)q(x) dx = \frac 1x \int {x}{\frac 1x} dx = 1+c$

I know I made a mistake somewhere. Would someone advice me on this??

-

solve rather $x\,dz/dx=z+1$ and then set $z=e^y$ – user8268 Nov 13 '12 at 9:50

## 1 Answer

You have $xe^y\frac{dy}{dx}=e^y+1$, so, by dividing both sides by $x$ and by $e^y+1$, we get $$\begin{align*}\frac{e^y}{e^y+1}\frac{dy}{dx}=\frac1x\hspace{5pt}&\Rightarrow \hspace{5pt}\frac{e^y}{e^y+1}dy=\frac1xdx\hspace{5pt}\Rightarrow \hspace{5pt}\int\frac{e^y}{e^y+1}dy=\int\frac1xdx \\ &\Rightarrow\hspace{5pt}\ln(e^y+1)=\ln (C|x|)\hspace{5pt}\Rightarrow \hspace{5pt}e^y+1=C|x|\end{align*}$$

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 8, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9380807876586914, "perplexity_flag": "middle"}