![]() |
Solving equation on a given domain - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: Solving equation on a given domain (/thread-32947.html) |
Solving equation on a given domain - Scientifix - Mar-18-2021 Dear all, I am trying to solve the following equation on [0,10] : -0.523*sinh( 0.0597^2 * 0.247^2 *X) + 0.9*cosh( 0.0597^2 * 0.247^2 *X) = 0.1 To do so I used solve() from sympy... but as I cannot give a domain it takes ages to solve (if it solves) !! I also tried solveset() from sympy but it fails to give me an answer (-87.78 is one for example). from sympy import solveset, solve, Symbol x = Symbol('x', real=True) sol = solveset(-0.523*sinh( 0.0597^2 * 0.247^2 *x) + 0.9*cosh( 0.0597^2 * 0.247^2 *x) - 0.1, x, Interval(0,10))Does anyone know how to restrict the domain using sympy ? And does any of you know a python solver for which no initial guess is required for solving ? Thanks in advance !! RE: Solving equation on a given domain - Gribouillis - Mar-19-2021 This equation can be solved exactly by using the exponential forms of cosh and sinh. It reduces to a quadratic equation. |