I need to do numerical computation by fourth order Runge Kutta Algorithm(adsbygoogle = window.adsbygoogle || []).push({});

in fortran. But I stuck in programming because the differential

equation contains imaginary part.

Take for e.g. the set of diff.equation are

x'=(i)y *exp(iwt) ;where i is imaginary no. and w is constant!

y'=(i)x*exp(iwt)

I tried to define complex function f and g as

f=(0,y *exp(iwt))

g=(0,x *exp(iwt))

and i defined x and y as real (because the argument of the complex

no.has to be real,right?/otherwise it doesn't accept)

But after every iteration,the x and y becomes real as

x=x0+some linear combination of the function f(which is complex)//and

real +complex gives complex no. and hence shows error!!!

So i unable to proceed further! So how should I proceed?

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Differential equation in fortran

Loading...

Similar Threads - Differential equation fortran | Date |
---|---|

Implementing symmetry boundary condition for the diffusion equation | Jul 23, 2017 |

Python Wave on string: How can I create a traveling triangle pulse? | May 8, 2017 |

Solving partial differential equation numerically | Dec 19, 2016 |

Solving differential equations using numeric methods | Oct 26, 2016 |

Coupled Differential Equations | Jun 10, 2009 |

**Physics Forums - The Fusion of Science and Community**