# Bernoulli Equation

#### mathmari

##### Well-known member
MHB Site Helper
Hello!!!

I have the following Bernoulli equation:
$$2xyy'+(1+x)y^2=e^{x}$$, $$x>0$$

$$lim_{x -> 0^{+}} y(x) <\infty$$

The transformation is $$u=y^{2}$$.

So, $$u'+(\frac{1}{x}+1)u=\frac{e^{2x}}{x}$$.

How can I find the initial value $$u(1)$$ so that $$lim_{x -> 0^{+}} u(x) <\infty$$ ??

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Hello!!!

I have the following Bernoulli equation:
$$2xyy'+(1+x)y^2=e^{x}$$, $$x>0$$

$$lim_{x -> 0^{+}} y(x) <\infty$$

The transformation is $$u=y^{2}$$.

So, $$u'+(\frac{1}{x}+1)u=\frac{e^{2x}}{x}$$.

How can I find the initial value $$u(1)$$ so that $$lim_{x -> 0^{+}} u(x) <\infty$$ ??
Hey mathmari!

I think that should be:
$$u'+(\frac{1}{x}+1)u=\frac{e^{x}}{x}$$

You can solve this ODE.
Its solution is:
$$u(x)=\frac{A e^{-x} + e^x}{2x}$$
as you can see here.

To make u(x) converge when $x \to 0^+$, you need $A=-1$.
According to l'Hospital, that gives us:
$$\lim_{x \to 0^+} \frac{e^x -e^{-x}}{2x} = \lim_{x \to 0^+} \frac{e^x +e^{-x}}{2} = 1$$
so it really converges.

So:
$$u(1) = \frac{e -e^{-1}}{2}$$

#### mathmari

##### Well-known member
MHB Site Helper
Sorry, I accidentally made a mistake at the exercise..

It's $$2xyy'+(1+x)y^2=e^{2x}$$, with solution $$u(x)=\frac{3Ae^{-x}+xe^{3x}}{3x}$$.

To make u(x) converge when $$x\rightarrow 0^{+}$$, must $$A=0$$??
Then $$lim_{x\rightarrow 0^{+}} \frac{xe^{3x}}{3x}=lim_{x\rightarrow 0^{+}} \frac{e^{3x}}{3}=\frac{1}{3}$$.
So, $$u(1)=\frac{e^{3}}{3}$$.
Is this right??

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Sorry, I accidentally made a mistake at the exercise..

It's $$2xyy'+(1+x)y^2=e^{2x}$$, with solution $$u(x)=\frac{3Ae^{-x}+xe^{3x}}{3x}$$.

To make u(x) converge when $$x\rightarrow 0^{+}$$, must $$A=0$$??
Then $$lim_{x\rightarrow 0^{+}} \frac{xe^{3x}}{3x}=lim_{x\rightarrow 0^{+}} \frac{e^{3x}}{3}=\frac{1}{3}$$.
So, $$u(1)=\frac{e^{3}}{3}$$.
Is this right??
Almost.

I think your solution should be:
$$u(x)=\frac{3Ae^{-x}+xe^{\color{red}{2x}}}{3x}$$

#### mathmari

##### Well-known member
MHB Site Helper
Almost.

I think your solution should be:
$$u(x)=\frac{3Ae^{-x}+xe^{\color{red}{2x}}}{3x}$$
Yes, you're right!!!

I have also thought another way to solve the exercise.. Could you tell me if it's right??

Using the Taylor series for the exponential:

$$e^{x}=1+x+\frac{x^2}{2}+...$$

$$e^{-x}=1-x+\frac{x^2}{2}-\frac{x^3}{3!}+...$$

$$e^{3x}=1+3x+\frac{(3x)^2}{2}+...$$

For small $$x>0$$
$$u(x)= \frac{1-x}{x}(c+\frac{1+3x}{3})= (\frac{1}{x}-1)(c+\frac{1+3x}{3})= \frac{1}{x}(c+\frac{1+3x}{3})-(c+\frac{1+3x}{3})$$ $$= \frac{1}{x}c+\frac{1}{3x}+1- (c+\frac{1+3x}{3})= \frac{1}{x}(c+\frac{1}{3})+1- (c+\frac{1+3x}{3})$$.

Since the term $$\frac{1}{x}$$ causes problems at $$x=0$$, we want to get rid of it, so $$c+\frac{1}{3}=0 \Rightarrow c=-\frac{1}{3}$$.

But with this way I have found else..

Last edited:

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Yes, you're right!!!

I have also thought another way to solve the exercise.. Could you tell me if it's right??

Using the Taylor series for the exponential:

$$e^{x}=1+x+\frac{x^2}{2}+...$$

$$e^{-x}=1-x+\frac{x^2}{2}-\frac{x^3}{3!}+...$$

$$e^{3x}=1+3x+\frac{(3x)^2}{2}+...$$
Aww! You really should become more careful with your exponential powers.
I take it you intended the following?
$$e^{2x}=1+2x+\frac{(2x)^2}{2!}+...$$

For small $$x>0$$
$$u(x)= \frac{1-x}{x}(c+\frac{1+3x}{3})$$
Hmm, where did your "c" come from?

Anyway, hold on! We have:
$$u(x) = \frac{3A e^{-x} + x e^{2x}} {3x}$$
$$u(x) =_1 \frac{3A (1-x) + x (1 + 2x)} {3x} = \frac{A (1-x)}{x} + \frac{1+2x}{3}$$
That looks different than what you have (and not only the 2x instead of 3x).
Note that I have used $=_1$ to denote that the equality holds for the first order approximation.
From this, you can again conclude that if the series is to converge, you will at least need that $A=0$.

You have to be careful with series expansions though.
If the resulting series converges, you're okay. Then the original formula will also converge.
But if it diverges, it's inconclusive. A diverging Taylor expansion does not necessarily mean that the original formula is undefined. In this case you're okay, since you're working within the radius of convergence of the exponential expansion.

MHB Site Helper
Ok! Thanks!!

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Ok! Thanks!!
Heh. This is an old thread. It actually originates from my birthday.
How come you're getting back to it now?

Edit: Hey! You have an avatar now!!

#### mathmari

##### Well-known member
MHB Site Helper
Heh. This is an old thread. It actually originates from my birthday.
How come you're getting back to it now?

Edit: Hey! You have an avatar now!!
I was looking at my old posts and realized that I hadn't thanked you!