integration constant

106 Views Asked by At

for the problem

$$(1-2x)y'=y$$

the BC'S are $y(0)=-1$ and $y(1)=1$ and $0\leq x\leq 1$.

I solved this and got $\ln y =\ln\left(\dfrac 2 {1-2x}\right)+c$.

How do we determine the constant such that $y$ is real and finite everywhere from $0$ to $1$ (both limits included)?

3

There are 3 best solutions below

1
On

$\ln y =\ln(2/(1-2x))+c\\ y =e^{\ln(2/(1-2x))+c}\\ y =e^{\ln(2/(1-2x))}e^{c}$

But $e^c$ is just as much of an arbitrary constant as $c$ was.

$y =Ce^{\ln(2/(1-2x))}\\ y =\frac {C}{1-2x}$

However, you have a problem at $x = \frac 12$

Going back to:

$(1-2x)y' = y \implies y(\frac 12) = 0$

And that is going to mean that $y = 0$ is the only valid solution over the interval $(0,1)$

And that gives you contradictions at the endpoints.

11
On

Your equation is: $$(1-2x)*\frac{\mathrm{d}y}{\mathrm{d}x}=y$$ $$\frac{1}{y}\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{1}{1-2x}$$ Integrating with respect to $x$: $$\int\frac{1}{y}\frac{\mathrm{d}y}{\mathrm{d}x}\mathrm{d}x=\int\frac{1}{1-2x}\mathrm{d}x$$ $$\log(y)=-\frac{1}{2}\log(1-2x)+C$$ $$\exp(\log(y))=\exp\left(-\frac{1}{2}\log(1-2x)+C\right)$$ $$y=\exp(C)\exp\left(\log\left(\frac{1}{\sqrt{1-2x}}\right)\right)$$ Redefining $C$: $$y=\frac{C}{\sqrt{1-2x}}$$ From $y(0)=-1$: $$-1=\frac{C_1}{\sqrt{1-2*0}}$$ $$C_1=-1$$ From $y(1)=1$ $$1=\frac{C_2}{\sqrt{1-2*1}}$$ $$C_2=\sqrt{-1}$$ So, for $y(1)=1$ the solution is $\frac{i}{\sqrt{1-2x}}=\frac{1}{\sqrt{2x-1}}$ (Thanks to @Dylan for pointing my mistake out), and for $y(0)=-1$ the solution is $y=\frac{-1}{\sqrt{1-2x}}$
And also, for a first order differential eqaution you can give only $1$ initial condition unless "they are telling the same" (To get a continuous solution). But you can consider the function $$y(x)= \begin{cases} -\dfrac{1}{\sqrt{1-2x}}& \text{for } x< \frac{1}{2}\\ \dfrac{1}{\sqrt{2x-1}} & \text{for } x>\frac{1}{2} \end{cases}$$ This function satisfies the differential equation for all $x\in \mathbb{R}\setminus\left\{\frac{1}{2}\right\}$, and it's continuous in it's domain.
Note: With using the absolute value you can avoid using complex numbers (and the mistakes they can cause) like Dylan did in his answer.

2
On

Let's go through the solution again. The equation separates to $$ \frac{y'}{y} = \frac{1}{1-2x} $$

The equation in undefined on $y=0$ and $x=\frac12$. This means there are 4 possible regions in $\Bbb R^2$ where the solution can exist.

$$ \begin{cases} \ln y = -\frac12 \ln (1-2x) + c_1, && x < \frac12, \ y > 0 \\ \ln (-y) = -\frac12 \ln (1-2x) + c_2, && x < \frac12, \ y < 0 \\ \ln y = -\frac12\ln(2x-1) + c_3, && x > \frac12, \ y > 0 \\ \ln (-y) = -\frac12\ln(2x-1) + c_4, && x > \frac12, \ y < 0 \end{cases} $$

If one is not looking for a specific solution that satisfies an initial condition, then you may write the general solution as $$ \ln |y| = -\frac12\ln|1-2x| + C $$

or $$ |y| = A |1-2x|^{-1/2} $$

That's the short answer for why we need absolute values when integrating the log function. The absolute values go away the moment an initial condition is assigned.

Back to our function. Your two initial conditions allow solutions in the second and third regions, respectively. The condition $y(0)=-1$ gives $c_2 = 0$. The condition $y(1)=1$ gives $c_3=0$. Putting it altogether and taking the exponential, we obtain the piecewise final solution

$$ y(x) = \begin{cases} -\dfrac{1}{\sqrt{1-2x}}, && x < \frac12 \\ \dfrac{1}{\sqrt{2x-1}}, && x > \frac12 \end{cases} $$


As for your last question, there are no such solution (except $y \equiv 0$) that is finite on $(0,1)$, again due to the singular point.