# Problem solving a system of equations using SymPy

**URL:** <https://discourse.julialang.org/t/problem-solving-a-system-of-equations-using-sympy/7051>\
**Category:** General Usage\
**Created:** [November 13, 2017, 8:28pm UTC](https://discourse.julialang.org/t/problem-solving-a-system-of-equations-using-sympy/7051 "2017-11-13T20:28:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [November 13, 2017, 8:28pm UTC](https://discourse.julialang.org/t/problem-solving-a-system-of-equations-using-sympy/7051/1 "2017-11-13T20:28:47Z")

</div>

I am trying to solve a system of equations:

```julia
using SymPy
@syms F_t delta F_a beta_c F_tp F_ap g_p theta v lambda
g = 9.81
m = 9.2;
r = 30;
eq1 = F_t*cos(delta) - F_a*cos(theta) + m*g*sin(beta_c)
eq2 = (m*v^2)/r - F_t*sin(delta) - m*g*cos(beta_c)*cos(lambda) - F_a*sin(theta)
solve([eq1, eq2], [F_t, theta])

```

I know that a solution exists (other CAS systems can find them), even though the result is quite complex.  
But solve just hangs, no error message, no result.  
Any idea?

Uwe

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [November 13, 2017, 9:20pm UTC](https://discourse.julialang.org/t/problem-solving-a-system-of-equations-using-sympy/7051/2 "2017-11-13T21:20:47Z")

</div>

You haven’t defined beta\_c and others. Was that on purpose so that the solution is a symbolic expression in these variables?

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [November 13, 2017, 9:41pm UTC](https://discourse.julialang.org/t/problem-solving-a-system-of-equations-using-sympy/7051/3 "2017-11-13T21:41:33Z")

</div>

Indeed, I would like to have a symbolic solution. The following code works already:

```julia
using SymPy
@syms F_t F_a v theta lambda delta
g = 9.81
m = 9.2
r = 30.0
beta_c = 25*pi/180.0
eq1 = F_t*cos(delta) - F_a*cos(theta) + m*g*sin(beta_c)
eq2 = (m*v^2)/r - F_t*sin(delta) - m*g*cos(beta_c)*cos(lambda) - F_a*sin(theta)
solve([eq1, eq2], [F_t, theta])

```

It takes a few minutes to solve. So perhaps the original task would also find a solution, if I wait long enougth. Any ideas how to improve the performance?

Uwe
