1
$\begingroup$

$$y'-\frac{y}{x}=1$$

We have a linear ODE in the form of $y'+P(x)y=Q(x)$ so we will use variation of parameters.

$y_{h}: y'-\frac{y}{x}=0$

$y_{h}: \frac{dy}{dx}=\frac{y}{x}$

$y_{h}: \frac{dy}{y}=\frac{dx}{x}$

$y_{h}: ln|y|=ln|x|+C$

$y_{h}=Kx$

$y_{p}=K(x)x$

$y'_{p}=K'(x)x+K(x)$

Substitute $y'_{p},y_{p}$ in the original ODE to get:

$K'(x)x+K(x)-\frac{K(x)x}{x}=1$

$K'(x)x+K(x)-K(x)=1$

$K'(x)x=1$ (Can I divide by $x$?)

$K'(x)=\frac{1}{x}$

$K(x)=ln|x|$

So $y_{p}=ln|x|x$

$y=y_{h}+y_{p}=Kx+ln|x|x$

  • 0
    I don't see the problem. You can divide by zero as you already do so in the starting equation to begin with.2017-01-16

1 Answers 1

1

You had:

$\color{blue}{y_{h}=Kx}$

and found:

So $\color{red}{y_{p}=ln|x|x}$

So instead of:

$y=y_{h}+y_{p}=ln|x|+C+ln|x|x$

(Where do the C and and the term $\ln|x|$ come from?) you get:

$y=\color{blue}{y_{h}}+\color{red}{y_{p}}=\color{blue}{Kx}+\color{red}{x\ln|x|}$


Addendum after your edits and comments.

Since the differential equation

$$y'-\frac{y}{x}=1$$

has an $x$ in the denominator, you necessarily have $x \ne 0$; so the answer to your question

$K'(x)x=1$ (Can I divide by $x$?)

is yes.

  • 0
    Thank for the quick response, you answered so quickly that I was editing it.2017-01-16
  • 0
    I was just wondering where the original equations went :-). Looks good now; why do you think something's wrong with your solution?2017-01-16
  • 0
    want to understand why Can I divide by $x$2017-01-16
  • 0
    There's an $x$ in the denominator in the original DE, so $x \ne 0$ to begin with; that's the only thing you need to be allowed to divide by $x$ later on as well.2017-01-16
  • 0
    @gbox I added that to my answer.2017-01-16