Solve the differential equation dy/dx=xy+y^2

Click For Summary
SUMMARY

The discussion focuses on solving the differential equation dy/dx = xy + y², which is identified as a Bernoulli equation. The solution involves using the substitution -1/y = t, leading to an integrating factor of e^(x²/2). The final solution incorporates the Erfi function, specifically z(y) = Ce^(-x²/2) - e^(-x²/2)√(π/2)Erfi(x/√2). The participants emphasize that the solution cannot be expressed in terms of elementary functions and discuss the properties of special functions like Erfi.

PREREQUISITES
  • Understanding of ordinary differential equations (ODEs)
  • Familiarity with Bernoulli equations
  • Knowledge of integrating factors and substitution methods
  • Basic comprehension of special functions, particularly the Erfi function
NEXT STEPS
  • Study the properties and applications of the Erfi function in mathematical analysis
  • Learn about Bernoulli equations and their solutions
  • Explore the use of integrating factors in solving differential equations
  • Investigate numerical methods for approximating solutions to unsolvable integrals
USEFUL FOR

Mathematicians, students of differential equations, and anyone interested in advanced calculus and the application of special functions in solving complex equations.

heman
Messages
353
Reaction score
0
How to solve the differential equation
dy/dx=xy+y^2

In my case this leads to an integral which is unsolvable! :cry:
 
Physics news on Phys.org
Most ODE's are analytically unsolvable.
It might be there exists a trick to manage this one, but off-hand, I can't help you.
 
The answer can not be expressed in terms of elementary functions. Although with the use of the quite commonly used Erfi function there is a fairly simple representation of the answer, why don't you show us what you have done so far.
 
I have done it this way:
i have put -1/y=t =>1/y^2dy=dt

dt/dx + xt =1
Integrating factor comes out to be e^(x^2/2)
So finally i have to integrate e^(x^2/2) to get the solution.!
I can do the integral but what perplexes is me that it's solution is not in form of elementary functions!
 
It's a Bernoulli equation, you can solve it by Leibniz substitution

v=y^{(1-n)}
 
That's exactly what i have done,but later it is unsolvable,or rather solution is not clear to me.
 
heman said:
That's exactly what i have done,but later it is unsolvable,or rather solution is not clear to me.

Alright, this is how I see it starting from:

d\left[e^{x^2/2}z\right]=-e^{x^2/2}

Integrating:

\int_{x_0,z_0}^{x,z} d\left[e^{x^2/2}z\right]=-\int_{x_0}^x e^{x^2/2}dx

Yielding:

z=Ke^{-x^2/2}-e^{-x^2/2}\int_{x_0}^x e^{t^2/2}dt

Noting that:


\int_{x_0}^x f(t)dt=K+\int_0^x f(t)dt

We can write the above expression as:

z(y)=Ce^{-x^2/2}-e^{-x^2/2}\int_0^x e^{t^2/2}dt

Letting u=t/\sqrt{2} we obtain:

z(y)=Ce^{-x^2/2}-\sqrt{2}e^{-x^2/2}\int_0^{x/\sqrt{2}} e^{u^2}du\quad\tag{1}

Now, it just so happens that:

Erfi[x]=\frac{Erf[ix]}{i}

and:

Erf[ix]=\frac{2i}{\sqrt{\pi}}\int_0^{x} e^{t^2}dt

so the i's cancel and we're left with:

Erfi[x]=\frac{2}{\sqrt{\pi}}\int_0^{x} e^{t^2}dt

or:

\int_0^{x} e^{t^2}dt=\frac{\sqrt{\pi}}{2}Erfi[x]

Substituting that into (1) we get what Mathematica reports:

z(y)=Ce^{-x^2/2}-e^{-x^2/2}\sqrt{\frac{\pi}{2}}<br /> Erfi\left[\frac{x}{\sqrt{2}}\right]

But z is 1/y so then 1 over all that stuf is the answer (if I didn't make any mistakes). How about a plot?

Also, I'll quote someone in here:

"Equal rights for special functions"

That means, treat Erfi[x] in the same way as Sin[x]. You wouldn't mind if the answer was:

z(x)=Ce^{-x^2/2}Sin[x]

would you? Same dif.
 
Oh yea, back-substitute everything into the ODE in Mathematica to make sure the answer is right. We can do that . . . like Gauss and the rest of them wouldn't have used Mathematica if they had it back then. Be for real. :smile:
 
saltydog said:
Alright, this is how I see it starting from:

d\left[e^{x^2/2}z\right]=-e^{x^2/2}

Integrating:

\int_{x_0,z_0}^{x,z} d\left[e^{x^2/2}z\right]=-\int_{x_0}^x e^{x^2/2}dx

Yielding:

z=Ke^{-x^2/2}-e^{-x^2/2}\int_{x_0}^x e^{t^2/2}dt

Noting that:


\int_{x_0}^x f(t)dt=K+\int_0^x f(t)dt

We can write the above expression as:

z(y)=Ce^{-x^2/2}-e^{-x^2/2}\int_0^x e^{t^2/2}dt

Letting u=t/\sqrt{2} we obtain:

z(y)=Ce^{-x^2/2}-\sqrt{2}e^{-x^2/2}\int_0^{x/\sqrt{2}} e^{u^2}du\quad\tag{1}

Now, it just so happens that:

Erfi[x]=\frac{Erf[ix]}{i}

and:

Erf[ix]=\frac{2i}{\sqrt{\pi}}\int_0^{x} e^{t^2}dt

so the i's cancel and we're left with:

Erfi[x]=\frac{2}{\sqrt{\pi}}\int_0^{x} e^{t^2}dt

or:

\int_0^{x} e^{t^2}dt=\frac{\sqrt{\pi}}{2}Erfi[x]

Substituting that into (1) we get what Mathematica reports:

z(y)=Ce^{-x^2/2}-e^{-x^2/2}\sqrt{\frac{\pi}{2}}<br /> Erfi\left[\frac{x}{\sqrt{2}}\right]

But z is 1/y so then 1 over all that stuf is the answer (if I didn't make any mistakes). How about a plot?

Also, I'll quote someone in here:

"Equal rights for special functions"

That means, treat Erfi[x] in the same way as Sin[x]. You wouldn't mind if the answer was:

z(x)=Ce^{-x^2/2}Sin[x]

would you? Same dif.

Thanks Salty :smile:
Everything is fine and well for me in yours solution!
Could you please throw some light on this New Emergent function!
I came across this first time!
 
  • #10
heman said:
Thanks Salty :smile:
Everything is fine and well for me in yours solution!
Could you please throw some light on this New Emergent function!
I came across this first time!

Well Erfi[x] is called the imaginary Error function and Erf[x] is the error function. Check out Mathworld for details. But just any valid expression can hold for a new function. There's tons of them. For example, if I have some irreducible integral of the form:

2e^c\int_0^{\sqrt{ln(x)-c}} e^{t^2}dt

I can call it Sal[x] such that:

Sal[x]=2e^c\int_0^{\sqrt{ln(x)-c}} e^{t^2}dt

and further:

\frac{dSal[x]}{dx}=\frac{1}{\sqrt{ln(x)+c}}


Same dif as Sin[x] as far as I'm concerned.
 
Last edited:
  • #11
Thanks Salty! :smile:
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 1 ·
Replies
1
Views
716
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
9K