Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
162 views

I found some similar questions about quiver plots and direction fields, but I’m still confused about the meaning of these two lines in many examples: What do dx = np.ones_like(f) and dy = f mean in a ...
Youness Ansarey's user avatar
-2 votes
1 answer
72 views

I'm trying to numerically integrate the equations of motion for a satellite moving about a spheroidal Earth using Heun's method, but I get a RuntimeWarning: invalid value encountered in scalar divide, ...
Don Al's user avatar
  • 107
1 vote
1 answer
171 views

First off, I just want to mention that I am a biology researcher not trained in differential equations or dynamical systems. I am doing this as an exercise to get a bit of intuitive understanding of ...
Ahmad Elsayed's user avatar
2 votes
1 answer
105 views

I'm solving Poisson equation and I've come across a problem that I cannot understand. All methods I'm using give a different result than the algebraic solution, which I believe is correct. Everything ...
Cymek3's user avatar
  • 23
0 votes
1 answer
100 views

Already tried with ddeint, does not yield good results. I have an equivalent PDE system that works just fine and I can compare results. The key of the problem is that the system is coupled, so I ...
Alvaro Ledo Antunez's user avatar
0 votes
1 answer
163 views

I want to solve some ODE just for one time step. The time step is decided internally by the solver, not by me. Is there a python adaptive-time-step ode solver which could do this? For illustration the ...
Naraghazi's user avatar
  • 121
0 votes
0 answers
63 views

I’m trying to generate a phase portrait for a system of coupled ordinary differential equations (ODEs) using Python’s scipy.integrate.solve_ivp. The system models the frequency of cooperators (x) and ...
Emon Hossain's user avatar
1 vote
2 answers
123 views

the model Im trying to graph this model however I am just not sure whether my code is leading me to a reasonable solution: import numpy as np import matplotlib.pyplot as plt from scipy.integrate ...
big_d's user avatar
  • 11
1 vote
2 answers
109 views

I am modelling a Coupled Spring-Mass-System: Two objects with masses m1 and m2, and are coupled through springs with spring constants k1 and k2, with damping d1 and d2. Method 1: taking a cookbook-...
Daniel Liu's user avatar
1 vote
1 answer
517 views

What I want to solve I solved a system of ordinary differential equations using scipy.integrate.solve_ivp and compared the results with my homemade 4th-order Runge-Kutta (RK4) implementation. ...
平田智剛's user avatar
0 votes
0 answers
57 views

I have implemented following equations both with the Matlab own ODE solvers and with a very simple finite difference scheme. The latter works properly, while the ODE code does not produce suitable ...
user299176's user avatar
0 votes
0 answers
69 views

I am trying to use ND Eigensystem to find the eigenvalues of the Woods-Saxon Potential Schroedinger Equation for Oxygen. I've defined the potential and operator, but I know the functions given are ...
Kol's user avatar
  • 33
0 votes
0 answers
56 views

I have the following system of differential equations that arose form circuit analysis where the following simplification was made. Simplification of equations The systems of equations is as follows: ...
noah rivas's user avatar
0 votes
1 answer
129 views

I am trying to solve this system of differential equations: The functions should behave like this, as r-> infinity (F = g = lambda = const.): A while ago I had a similar problem and a user was ...
Hendriksdf5's user avatar
1 vote
0 answers
91 views

I want to solve the following boundary value problem where S, k_i, x_f, α_1, and θ are known parameters. We are trying to solve for h(x), p, and θ_d. My idea was to use finite differences to create a ...
Mjoseph's user avatar
  • 163
1 vote
1 answer
107 views

I'm trying to simulate the orbit of a planet using the compute_orbit method, but when I plot the resulting positions, I get a straight line instead of an expected elliptical orbit. Below are the ...
hassam rajpoot's user avatar
2 votes
1 answer
99 views

I tried to develop a model of an Organic Rankine Cycle from scratch. The heat exchanger is the only dynamic submodel of the cycle, and it runs perfectly whenever I use water as the medium (both in ...
user26663722's user avatar
0 votes
0 answers
93 views

I was following the tutorial at SymPy site on how to solve differential equations, and started with the classic case of finding a function that equals its own derivative, as shown bellow: from sympy ...
kleite's user avatar
  • 337
2 votes
1 answer
187 views

I want to solve (1-x^2)y'=x^2-xy-1 with Sympy, but I cannot solve it as expected. I expect to get the following solution. -1<x<1:y(x)=-sqrt(1-x**2)*asin(x)+C1*sqrt(1-x**2) x<-1,x>1:y(x)=-...
Ryo's user avatar
  • 21
0 votes
1 answer
49 views

I want to solve an ordinary differential equation in Python using scipy.odeint while returning some values from a defined function, which are not differentials. I tried storing the additional values ...
Malte Radecke's user avatar
0 votes
1 answer
111 views

I would like to solve the Korteweg-De Vries equation with the initial conditions U(x,0) = n(n+1)/cosh^2(x). However, my system becomes numerically unstable for n>1 (n is an integer), what could be ...
Hendriksdf5's user avatar
0 votes
0 answers
127 views

I've got a differential equation which I have solved exactly in terms of Jacobi elliptic functions. Now I'd like to efficiently evaluate the (exact) solution numerically for the sake of plotting and ...
miggle's user avatar
  • 101
1 vote
1 answer
111 views

I am trying to mimic a mathematical model based on the following model documentation. 4.1.1.4 Exposure to Vapour: Evaporation https://www.rivm.nl/bibliotheek/rapporten/2017-0197.pdf Python script: ...
Nick's user avatar
  • 927
0 votes
1 answer
207 views

I am trying to solve three coupled differential equations in Python. I am using RK-4 techniques with Shooting method. I am trying to plot the f and N functions. import numpy as np import matplotlib....
Prosenjit Paul's user avatar
0 votes
0 answers
33 views

I'm trying to solve an exact integration of a nonlinear ODE using SageMath. I'm trying to find time function $x = x(t)$ integrating ODE $\dot{x} = b(2+\sqrt(1-x^2))(1-x^2)$ with SAGEMATH code below: t ...
Alexandre Masson Vicente's user avatar
1 vote
0 answers
27 views

Problem Statement I have a TensorFlow machine learning model that should learn to mimic a digital result [0, 1], the output of the model is a float number, so I have used a MeanSquaredError and ...
ycsvenom's user avatar
0 votes
2 answers
85 views

I get error when trying to plot a graph : TypeError: Cannot convert expression to float I also get empty graph: from sympy import * from IPython.display import display init_printing() import ...
tomopa73's user avatar
0 votes
1 answer
327 views

I am trying to solve a complex system of differential equations. The equations are stiff so I need to need to use a method which can handle both complex ODEs and stiffness switching. I have landed on ...
MarcosMFlores's user avatar
0 votes
1 answer
57 views

Is this the right way to write a spring mass damper system in julia using DifferentialEquations.jl? function smd(du, u, p, t) c, k, m = p du[1] = dx = u[2] du[2] = dv = -(c/m)*u[2] - (k/m)*...
BAR's user avatar
  • 17.5k
2 votes
1 answer
72 views

I'm reasonably new to R and have this system of ODEs \frac{dS}{dT} = -\beta(1-\mu)S(t)\frac{I(t))}{1-D(t))} \frac{dI}{dT} = -\beta(1-\mu)S(t)\frac{I(t))}{1-D(t))}-\delta I(t))-\phi I(t)) \frac{dR}{dT}=...
Tom FitzGerald-Jones's user avatar
1 vote
1 answer
64 views

I am using NonlinearSolve to solve a steady state problem. When I do prob = SteadyStateProblem(eoms!, σ₀, p) sol = solve( prob, SSRootfind(), abstol = slv.abstol, reltol = slv.reltol, )...
mrW's user avatar
  • 49
1 vote
1 answer
159 views

I'm attempting to implement a simple Physics-Informed Neural Network (PINN) for Solving the time-independent Schrödinger equation given an arbitrary scalar potential. The details aren't, I think, ...
PerplexedDimension's user avatar
1 vote
0 answers
43 views

I am currently working on a simulation project involving a two-degree-of-freedom (2DOF) airfoil. The motion of this airfoil is governed by the following equations of motion: To numerically solve ...
Amir Khan's user avatar
-1 votes
1 answer
135 views

I have the following code: import numpy as np from scipy.integrate import odeint import matplotlib.pyplot as plt import random def dose(y, t, b, s, c, p, i): target, infectious, virus = y ...
user1134699's user avatar
0 votes
1 answer
107 views

I have the following RK4 algorithm in C++ for solving first-order differential equations: using ODE_Function = std::function<double/*dy/dx*/(double/*x*/, double/*y*/)>; template<int length&...
Aryan MP's user avatar
1 vote
1 answer
168 views

I have a questions very similar to this post. Unfortunately there is no answer for the question and I have additional questions. I am trying to generate a solve for the current in an RLC circuit and ...
Noahwar97's user avatar
0 votes
0 answers
96 views

I'm trying to solve a problem of filling and emptying of a retention behind a dam. What I've got are: 1) a function that relates the elevation of the water in the retention with the volume of the ...
n6r5's user avatar
  • 364
2 votes
1 answer
90 views

I am trying to edit the Gray-Scott 1D equation example (last example on the page) in the odeint documentation. I have the code below and it works for the Neumann boundary conditions but I want a ...
Zack Fair's user avatar
  • 239
0 votes
1 answer
292 views

I am working with a set of data Time = [1, 1.25, 2.5, 3.75, 5, 6.25, 7.5, 8.75, 10] AB = [0.041355887, 0.228856274, 0.283712222, 0.401528071, 0.450842768, 0.514348728, 0.550876642, 0.61845291, 0....
HAILEY RUDE's user avatar
0 votes
1 answer
137 views

I would like to determine the following system of coupled, nonlinear, elliptic ODEs of second order with boundary conditions f(0) = h(0) = 0, f(1) = h(1) = 1. I used a relaxation method to solve the ...
Hendriksdf5's user avatar
2 votes
1 answer
103 views

To find the deformations on the quarter of a ring I found the following formulations: ϵ=(θ′−1/R)∗t/2, θ(s)′′=−F4EI∗cosθ, θ(0)=π/2, θ(L/4)=0 Being L the medimum circumference, R the medium radius, t ...
Ale's user avatar
  • 21
1 vote
0 answers
86 views

Relatively recently, as part of my research work, I had to numerically solve a system of differential equations, and instead of using ready-made programs written in Fortran, I decided to write my own ...
Goodger Channel's user avatar
0 votes
1 answer
224 views

I have a system of differential equations containing 62500 simultaneous equations. The system dynamics are linear and of the form: [dU/dt] = [Jacobian]x[U]. The jacobian is sparse (non-zero vals ~ 0.6%...
balaji sriram's user avatar
2 votes
1 answer
699 views

I would like to solve the following DGL system numerically in python: The procedure should be the same as always. I have 2 coupled differential equations of the 2nd order and I use the substitution g'...
Hendriksdf5's user avatar
4 votes
1 answer
80 views

I have the following problem. I would like to solve the following DGL system numerically in python: $$ \begin{align*} &g'' + \frac{2}{r} g' - \frac{2}{r^2} g - \frac{3}{r} e g^2 - e^2 g^3 - \frac{...
Hendriksdf5's user avatar
0 votes
0 answers
720 views

My code solves a 1st order differential equation using Scipy's solve_ivp function and the standard RK45 solver. The code itself is reasonably large, and I will certainly attempt to produce a minimal ...
Aleksejs Fomins's user avatar
0 votes
2 answers
74 views

I'm trying to solve multiple ordinary differential equations in Python using odeint. A simple version would look like: import numpy as np from scipy.integrate import odeint def lotka_volterra(xy, t): ...
kramerey's user avatar
0 votes
0 answers
280 views

I have a question regarding my code. I have to solve an ODE: [y′(t)=(0.5−t)(y(t) + 1), y(0) = 1], numerically (and approximate), using the explicit and implicit Euler as well as the trapezoid method ...
juzze's user avatar
  • 3
0 votes
0 answers
100 views

I'm struggling to find a solution for these coupled differential equations: dz1/dt = z1(t) H11(t) + z2(t) H12(t) dz2/dt = z2(t) H22(t) + z1(t) H21(t) Here, z1(t) and z2(t) are unknown functions that ...
Rivnat Chowdhury's user avatar
0 votes
0 answers
51 views

i'm working on resolving this differential equation : z" + w0²z=w0²zeq + a(t) for this i'm now using odeint or solve_ivp from module scipy.integrate in Python and it seems to work well if i give ...
Clément Thiry's user avatar

1
2 3 4 5
31