# Homework Help: Complex ODE ?

1. Oct 12, 2005

### sam2

Hi,

I have never had to handle ODEs where the coefficients are complex. Just wondering if solving this is even possible and whether you can point me to any sources/books.

(df/dx) + a.f^2 + (b+i)f + c = 0

where f(x) is a function of x, a, b and c are constants, and i =sqrt(-1). Clearly if 'i' didnt feature then I could solve this quite easily and depending on the values of a, b and c this might be a logarithm or trig function. But in the presence of 'i' how do I solve this? How do I determine if I need to use the trig substitution or whether it is a logarithmic solution. Is it enough to just consider the real part of the complex coefficient and proceed in this way?

Thanks,

2. Oct 12, 2005

### Zurtex

Just replace b with (b + i). Is not the general solution to this just:
$$f(x) = \ldots + \tan \left( \left[ \frac{\sqrt{-b^2 + 4ac}}{2} \left( -x + \mathcal{K} \right) \right] / 2a \right)$$
Where $\mathcal{K}$ is some constant and the $\ldots$ are just some function of a, b and c.

Last edited: Oct 12, 2005
3. Oct 12, 2005

### saltydog

I get:

$$f(x)=\left(\frac{-b}{2a}\right)+\frac{\sqrt{4ac-b^2}}{2a}\text{Tan}\left(\frac{k-x}{2}\sqrt{4ac-b^2}}\right);\quad b\in \mathbb{C}$$

Note that this is the solution independently if the constants are Real or Complex. Since this is a non-linear equation, the Real or Complex part of a complex-valued solution do not independently satisfy the ODE: you need all of it. Sometimes you can get it into a nice form however like:

$$f(x)=g(x)+ih(x)$$

4. Oct 12, 2005

### Zurtex

Yeah, my mistake for inside the Tan function, but I didn't write the whole thing on purpose, nevermind.

5. Oct 17, 2005

### sam2

Hi,
Thanks for the replies. But I am still unsure as to why the solution is a tangent rather than a logarithm. We can rewrite the quadratic term in the ode as the difference of two squares, say:

1/a . df / (F^2 + D^2) = dx

If D is positive then I agree that the solution uses a tan substitution. If D is negative then we arrive at a alogarithmic solution. But we have D complex so I was stuck!

Are you saying that all I need to do is to replace (b+i) with the real part (in this case b) and then proceed as if the 'i' didnt exist (so that the solution is tan or ln depending on the sign of b)?

Best,

Sam

6. Oct 17, 2005

### saltydog

Thanks Sam for pointing that out. I didn't see that. Anyway, don't ignore the i for sure: the integral is a "conditional one" depending on the values of the constants. However, the solution(s) take the same form whether the constants are Real or Complex: In the former case, the solution is a real-valued function; the latter, a complex-valued function.

7. Oct 17, 2005

### sam2

So do I just solve the ODE on the basis of the sign of the real part of the complax coefficient? I.e. I still dont know whether to use a tan or ln solution to the above. My b is indeed positive but I was worried about using a tan substitution because of the 'i'. So you are effectively saying that the presence of 'i' should not impact the solution of the ODE other than make it complex, i.e. if b is positive use a tan, if it is negative, use a log, except now we are taking the log or tan of a complex rather than a real?

regards,