Python Forum
Solving equation on a given domain
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solving equation on a given domain
#1
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 !!
Reply
#2
This equation can be solved exactly by using the exponential forms of cosh and sinh. It reduces to a quadratic equation.
ndc85430 likes this post
Reply


Forum Jump:

User Panel Messages

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