3.3.4.8 Example 8 y2y=2y
y2y=2yy(0)=1

This one is tricky. As it is also Bernoulli ode. The Bernoulli ode has form y+py=qyn where here p=2 and q=2 and n=12. It turns out solving this as quadrature causes a problem with IC due to how the integration works out. Let solve it both ways to show this.

y=f(y)=2y+2y

We see right away that by existence and uniqueness, f and fy are defined at IC. Hence solution exist and unique on some region that includes the point (0,1). To solve as quadrature we just need to integrate. This gives (using Mathematica’s Integrate)

dyy+y=2dx2ln(1+y)=2x+c

Now we need to find c. At IC we have

2ln(2)=c

Hence the solution is

2ln(1+y)=2x+2ln(2)ln(1+y)=x+ln(2)1+y=exeln2=2ex

Hence

y=2ex1y=(2ex1)2=4e2x4ex+1

This is valid for 2ex1>0. So it might be better to keep the solution implicit as y=2ex1.  Let look at Maple’s integrate. It gives

dyy+y=2dxln(y1)+2arctanh(y)=2x+c

Here is the problem. At y=1 we get ln(0). Even though both antiderivatives are correct, since they both differentiate back to 1y+y, using Maple’s result causes problem solving for the constant of integration since its anti-derivative is complex valued for all y. Let now solve the same ode using Bernoulli method. The form is

y+py=qyn

where here p=2 and q=2 and n=12. Starting by dividing by y12 gives

yy122y12=2

Let v=y1n=y12 and therefore v=12y12y or y=2vy12. Hence the above becomes

2v2v=2vv=1

Integrating factor is ex. Hence ddx(exv)=ex or vex=ex+c. Therefore v=1+cex. Which means y=1+cex. At x=0,y=1 this gives

1=1+cc=2

Hence the solution is

y=1+2ex

Which is the same solution using the integration result given by Mathematica. We see that using Bernoulli in this example makes the integration easier and solving for constant of integration is also easier.