differential-equations Questions
2
Solved
I'm trying to simulate a simple diffusion based on Fick's 2nd law.
from pylab import *
import numpy as np
gridpoints = 128
def profile(x):
range = 2.
straggle = .1576
dose = 1
return dose/(s...
Roth asked 23/4, 2014 at 15:25
3
SciPy can solve ode equations by scipy.integrate.odeint or other packages, but it gives result after the function has been solved completely. However, if the ode function is very complex, the progr...
Agrigento asked 26/11, 2019 at 9:40
4
Solved
I want to use a function's derivative in an other function. How should this be done in Maxima?
E.g:
f(x) := 2*x^4;
g(x) := diff(f(x),x)-8;
Now g(x) yields 8x^3-8 as expected, but g(0) gives an ...
Bindle asked 12/12, 2011 at 4:56
2
Solved
I am trying to solve this system of ODEs through deSolve, dX/dt = -X*a + (Y-X)b + c and dY/dt = -Ya + (X-Y)*b for time [0,200], a=0.30, b=0.2 but c is 1 for time [50,70] and 0 otherwise. The code I...
Sneaker asked 4/11, 2021 at 16:57
4
Solved
I would like to lower the time Scipy's odeint takes for solving a differential
equation.
To practice, I used the example covered in Python in scientific computations as template. Because odeint ...
Ungodly asked 16/3, 2017 at 15:18
2
I am facing a problem I do not manage to solve. I would like to use nlme or nlmODE to perform a non linear regression with random effect using as a model the solution of a second order differential...
Braille asked 18/1, 2021 at 16:17
3
Solved
I am wondering how to export MATLAB function ode45 to python. According to the documentation is should be as follows:
MATLAB: [t,y]=ode45(@vdp1,[0 20],[2 0]);
Python: import numpy as np
def vd...
Bindle asked 24/1, 2018 at 17:14
2
I want to solve this differential equation:
y′′+2y′+2y=cos(2x) with initial conditions:
y(1)=2,y′(2)=0.5
y′(1)=1,y′(2)=0.8
y(1)=0,y(2)=1
and it's code is:
import numpy as np
from scipy.integra...
Viewing asked 22/4, 2018 at 10:1
3
Solved
I am trying to solve an ODE in R using deSolve. With the following code, I expected the parameter gamma0 takes the values 5 at time step 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10, and 0 otherwise. Howeve...
Damarisdamarra asked 24/3, 2017 at 16:54
2
I have a set of 3D points defining a 3D contour.
What I want to do is to obtain the minimal surface representation corresponding to this contour (see Minimal Surfaces in Wikipedia). Basically, this...
Proglottis asked 18/5, 2013 at 14:22
4
This question is a continuation of this one.
My goal is to find the turning points in stock price data.
So far I:
Tried differentiating the smoothed price set, with the help of Dr. Andrew Burne...
Lanta asked 11/1, 2012 at 11:20
1
Solved
First of all, I am using the DifferentialEquations.jl library, which is fantastic! Anyway, my question is as follows:
Say for example, I have the following differential equation:
function f(du, u...
Dish asked 9/4, 2019 at 4:16
1
Solved
Many users have asked how to solve the Heat Equation, u_t = u_xx, with non-zero Dirichlet BCs and with conjugate gradients for the internal linear solver. This is a common simplified PDE problem be...
Runlet asked 6/2, 2019 at 2:13
1
Solved
I am trying to apply a system of ordinary differential equations (ODEs) at each spatial grid cell. Thus, each landscape cell has an associated ODE model. The number of susceptible mosquitoes (Sv), ...
Unbearable asked 17/4, 2018 at 16:36
1
Solved
I am a physics student interested in solving ODEs numerically. I usually write my own solvers in C using Runge–Kutta methods.
I recently learned Python, and I used SciPy’s odeint function to solve...
Sharmainesharman asked 12/4, 2018 at 14:44
2
Solved
I am trying to find a way to make this code faster.
Nagumo1 is the function that calculates the value of the two derivatives at time t.
function x = nagumo(t, y, f)
Iapp = f(t);
e = 0.1;
F = 2/...
Cismontane asked 13/3, 2018 at 12:4
1
Solved
Here's what I did:
from sympy import *
x = symbols("x")
y = Function("y")
dsolve(diff(y(x),x) - y(x)**x)
The answer I get (SymPy 1.0) is:
Eq(y(x), (C1 - x*(x - 1))**(1/(-x + 1)))
But that's w...
Thain asked 8/1, 2018 at 10:48
4
I am having some trouble translating my MATLAB code into Python via Scipy & Numpy. I am stuck on how to find optimal parameter values (k0 and k1) for my system of ODEs to fit to my ten observed...
Hydranth asked 1/7, 2012 at 1:1
1
Can anybody give me some advice how to solve an ODE in Python that has a time-delay implemented in it? I can't seem to figure out how to do it using scipy.integrate.odeint. What I am looking for sh...
Tailing asked 6/3, 2017 at 18:3
2
Solved
Given some f and the differential equation x'(t) = f(x(t)), how do I compute x(n)(t) in terms of x(t)?
For example, given f(x(t)) = sin(x(t)),
I want to obtain x(3)(t) = (cos(x(t))2 − sin(x(t))2) s...
Ogilvy asked 29/10, 2016 at 22:32
1
Solved
I am numerically setting up a mesh grid for the x-grid and x-vector and also time grid but again I have set up an array for x (position) which should only be between 0 and 20 and t (time) would be ...
Zest asked 7/4, 2016 at 23:35
1
Solved
I have a simple flux model in R. It boils down to two differential equations that model two state variables within the model, we'll call them A and B. They are calculated as simple difference equat...
Auckland asked 15/12, 2015 at 17:58
1
I am numerically solving a differential equation that depends on parameters. I am not really interested on the solutions but on their behaviour depending on the value of the parameters. Since I wan...
Spasmodic asked 4/10, 2013 at 14:39
1
I am using pseudo-spectral method to solve for KdV equation u_t + u*u_x + u_xxx = 0. After simplification by Fourier Transform, I got two equations with two variables:
uhat = vhat * exp(-i*k^3*t)...
Ardent asked 14/4, 2015 at 0:11
3
In MATLAB, ode45 has a parameter called NonNegative which constrains the solutions to be nonnegative. They even wrote a paper about how this method works and how it's not something as stupid as jus...
Besant asked 8/8, 2011 at 1:53
1 Next >
© 2022 - 2025 — McMap. All rights reserved.