简体   繁体   中英

Solving Numerical four coupled differential equations using Runge-Kutta

How can I solve the following four coupled equations numerically in Python?

I need a source code !!!!!

y'(1) = (-wa+wp)*y(2)+g*y(4)
y'(2) = (-wa+2wp)*y(1)-g*y(3)
y'(3) = (wa-wp)*y(4)+g*y(2)
y'(4) =-(wa+wp)*y(3)-g*y(1)

Check out Integration and ODEs (scipy.integrate) . Exactly which solver you use will depend upon the boundary conditions you have: particularly solve_ivp for initial value problems and solve_bvp for boundary value problems.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM