Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
solve ODE with sympy
#1
Hello
Is it possible to solve this differential equation using sympy?
z'' + c * z = -sign(z')
I tried to solve it and got the following error:
Error:
No algorithms are implemented to solve equation _Dummy_39 + x(t) + sign(_X0)
Code:
import sympy as sp
import numpy as np
sp.init_printing()


t = sp.symbols('t')
x = sp.Function('x')(t)
x_dot = x.diff(t)
x_two_dot = (x.diff(t)).diff(t)

expr = sp.Eq(x_two_dot, -sp.sign(x_dot) -x )

sol = sp.dsolve(expr); sol
Thanks for your helps
Reply


Messages In This Thread
solve ODE with sympy - by Sergey_Novak - Dec-01-2023, 11:35 AM
RE: solve ODE with sympy - by Gribouillis - Dec-01-2023, 05:03 PM
RE: solve ODE with sympy - by Sergey_Novak - Dec-02-2023, 12:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I need assistance with getting sympy to work alex_0 1 1,539 Apr-05-2021, 09:15 PM
Last Post: snippsat
  Sympy error "object is not callable" Cupcake 0 4,950 Feb-08-2020, 02:22 AM
Last Post: Cupcake
  Get the variables in a sympy expression SJ001 8 7,392 Feb-12-2019, 07:25 AM
Last Post: SJ001
  Sympy Import error: "unresolved referrence 'sympy' " BoaCoder3 0 2,705 Jul-27-2018, 12:48 PM
Last Post: BoaCoder3
  SymPy - SolveSet Values Plant_Boy 0 2,522 Jan-01-2018, 09:20 PM
Last Post: Plant_Boy
  Sympy symbolic Point shoulddt 0 2,775 Jul-17-2017, 06:07 PM
Last Post: shoulddt
  Sympy Integration Flexico 5 7,544 Dec-07-2016, 07:24 AM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020