Questions tagged [dsolve]
69 questions
0
votes
1 answer
Solving a system of coupled differential equations with dsolve_system in python (sympy)
I want to solve a system of 4 coupled differential equations with python (sympy):
eqs = [Eq(cP1(t).diff(t), k1*cE1(t)**3), Eq(cE1(t).diff(t), -k1 * cE1(t)**3 + k6 * cE3(t)**2), Eq(cE2(t).diff(t), -k8 * cE2(t)), Eq(cE3(t).diff(t), k8 * cE2(t) - k6 *…

Isabel Waibel
- 11
- 3
0
votes
1 answer
Solving a differential equations but an error appears saying "'Add' object is not callable". I am using Jupyter Notebook
To make it clearer I want to plot the solutions of the 2nd order differential equation of the damping oscillation for a pendulum. Link to wiki about the equations used : https://en.wikipedia.org/wiki/Harmonic_oscillator
from sympy.interactive import…

Mixalhs
- 15
- 6
0
votes
0 answers
KeyError: exp(t) using dsolve from sympy for simple ODE
I am struggling to understand the behaviour of dsolve for this simple ODE:
Y''(t) = b*Y'(t) + f(t)
For some reason, dsolve throws an error if I use f(t)=exp(t-a), but for general f(t) or f(t)=exp(a*t) or if I put a value for a, dsolve succeeds. The…

DNick
- 3
- 2
0
votes
0 answers
A simple differential equation system by Sympy
I'm trying to solve the below simple differential equation with Sympy
import sympy as sp
x, y = sp.symbols('x, y', cls= sp.Function)
t = sp.symbols('t')
m = 5
a = -9.8
eq1, eq2 = sp.Eq(y(t).diff(t,2),m*a),…

Vahid
- 179
- 1
- 9
0
votes
0 answers
How to check if `sympy.dsolve` can solve differential equation in explicit form?
I'm testing dsolve method of sympy package in order to check if any differential can be solved and return solution if it is. Trying to solve equation of this kind
from sympy import dsolve
t = symbols('t')
x = Function('x')
dsolve(x(t).diff(t) -…

mathfux
- 5,759
- 1
- 14
- 34
0
votes
0 answers
Strange output dsolve matlab
I'm trying to solve a differential equation, but the output shows the result in two lines, what does it mean?
clear
clc
syms g(t) a b c a0 q V calculated_gamma tox kb T Vel0 Ea t1 c0 k1
eqn = diff(g,t) == -Vel0 *…

davmc
- 47
- 2
- 8
0
votes
1 answer
system of ODE simpy dsolve
How can I solve multiple ODEs? sympy.dsolve returns the same integrations constants, so I cannot solve it.
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from sympy.interactive import…

Mark
- 25
- 5
0
votes
1 answer
Sympy - limitations in the computation ability of dsolve function?
I am trying to solve a system of fourth-order differential equations using Sympy. The equations I have used are shown in the image, and written in the code below:
latex_equations :
from sympy import *
x = symbols('x')
EI1,EI2,EI3,a1,a2,a3,Qh,Mecc =…

leahdv
- 3
- 1
0
votes
0 answers
Matlab : system of four coupled odes
So, I've been working on this physics problem where I face a system of four coupled differential equations which I can't seem to find the answer to
TT0 = 0; %initial release angle Theta
l0 = 1; %initial left line length (in meters)
m = 1;
M = 3;
R =…

hirad davari
- 103
- 6
0
votes
1 answer
How to use interp1 function in matlab on a function of type symfun?
I have solutions to a system of differential equations in my matlab script. I define my functions as follows:
syms V_x(t) V_y(t) X(t) Y(t);
ode_V_x = diff(V_x,t) == -(B/m)*V_x;
ode_V_y = diff(V_y,t) == -g - (B/m)*V_y;
ode_X = diff(X,t) == V_x;
ode_Y…

Ams
- 347
- 1
- 3
- 12
0
votes
1 answer
Using "subs" Function to Evaluate Output of "dsolve" Give Extra Output in Maltab
Introduction
If you want to know the grand scheme... read the introduction. If not, Just skip down to My Problem.
I have a project for my Differential Equations and Linear Algebra course where I have to use a computer algebra system to solve both…

ApBrown
- 35
- 7
0
votes
1 answer
Spring/Damper Calculation & Plotting
Given two systems with damper/spring:
First system's simulink model with step time 2, final value 0.5:
Simulink of the second system with same input:
I have to find the code using dsolve and ode45 to generate the same graph with Simulink. Given…

S. Seo
- 11
- 1
- 5
0
votes
0 answers
DSolve Command - Mathematica
I want to solve this differential equation using Mathematica:
de[r_]= [(-6 r+(-7+θ) ρ[r] (ρ^′)[r]) (1+(ρ^′)[r]^2)+r ρ[r] (ρ^′′)[r]
DSolve[de[r_]==0,r,ρ[r]]
which is not working.
is there other way to solve this?

M.R. H.Loo
- 1
- 4
0
votes
0 answers
Dsolve diff. and sin function as symbolic equation
I am looking for a way to solve the following differential equation by MATLAB:
Y=-acc*h*cos(t) + g*h*sin(t) - gama*T.'*H*cos(t)-I0*diff(t,2)
X=solve(Y==0,t)
and the parameters defined as:
g=9.81; c=0.03; w=0.05; acc=0.5*g; gama=0.05;
syms t(x) h b…

saf
- 1
0
votes
1 answer
Graph of dsolve
How to plot the following function? I need x range of [0; 1].
syms y(x)
y(x) = dsolve(diff(y,x) == tan(x), y(0) == 1);
plot(y, [0 1]);

Russiancold
- 1,179
- 1
- 11
- 26