# Ricatti's Equation (non linear ODE)

1. Sep 20, 2010

1. The problem statement, all variables and given/known data

Solve $y' = y^2 - xy +1 \qquad(1) \qquad ,$ using the substitution y = x + 1/u

3. The attempt at a solution

Upon substitution, I arrive at

$$du/dx - xu = 1$$

which is linear/1st order/non-homogenous. When I apply the integrating factor method, I arrive at

$$u(x) = e^{\frac{1}{2}x^2}\left ( \int e^{-\frac{1}{2}x^2}dx + C\right ) \qquad(2)$$

I am not sure how to deal with (2) as it is non integrable in terms of elementary functions. When I solve (1) using Wolfram Alpha, the solution is in terms of the error function. We have not covered the error function in class since it is assumed to be prior knowledge. However, I have never used it in any classes, so I am unsure how to manipulate (2) using erf().

From wiki, I have the definition to be

$$erf(x) = \frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}\,dt\qquad(3)$$

and this is to be used to replace my integral in (2), namely

$$\int e^{-\frac{1}{2}x^2}dx + C\qquad(4)$$

Now two things are confusing me here:

1) How to deal with the bounds in the integral in the definition of erf(x) since I am dealing with an indefinite integral in (4)?

2) How to deal with the factor of 1/2 that I have in (4)?

2. Sep 21, 2010

### D H

Staff Emeritus
Recall the fundamental theorem of calculus, which (in part) relates the indefinite integral (antiderivative) and the definite integral. Given some function $f(x)$ that is integrable over some interval $$a,b$$, then for $x\in[a,b]$, $\int_a^x f(x)dx$ is an antiderivative of $f(x)$.

This is a simple change of variables. The t in the definition of erf(x) is a dummy variable.

3. Sep 21, 2010

Hi D H

I guess I have never really figures out the fundamental theorem in the sense that I have never had to use it formally. I have always just 'taken' antiderivatives and not thought much about it. I have always just thought of indefinit integrals as having a constant in them, and then definite integrals do not (since we evaluate the integral over an interval). So I am not sure what exactly you are driving at with that point. Are you simply saying that since my antiderivative is only valid on [0, x] then so is my solution?

Also, I still don't really understand the change of variables here. Exactly where does the 1/2 go?

4. Sep 21, 2010

### jackmell

You need to get use to the integral sign. (2) is just a function, u(x). Often when solving DEs, you'll arrive at integrals you can't integrate so we leave them un-antidifferentiated. But that is perfectly fine and the expression you give for u(x) above is perfectly fine and whenever you need to evaluate it for any limits, any IVP, you simply evaluate the integral in the expression for u(x) anyway that is appropriate for you such as numerically. Also, that error function reported by Wolfram is just another name for that exponential integral, with some minor changes to it.

5. Sep 21, 2010

Hi jackmell! I am perfectly used to integrals; my professor is not. So leaving (2) as is, is not an option

6. Sep 21, 2010

### jackmell

My apologies to you for insinuating that you might be a tad bit fearful or intimidated by integral signs showing up in equations. :)

And what do you mean leaving it as an integral equation is not an option? What's wrong with that when the best you could do is just call the integral part some function like, wait, let me think . . . oh yeah, let's call it the Erf function with some minor changes to it, and then just write:

$$u(x)=x+\frac{e^{\frac{x^2}{2}}}{C[1]-\sqrt{\frac{\pi }{2}} \text{Erfi}\left[\frac{x}{\sqrt{2}}\right]}$$

That's not much different than just y=sin(x)

Last edited: Sep 21, 2010