# ModelingToolkit, Symbolics, Complex{}

**URL:** https://discourse.julialang.org/t/modelingtoolkit-symbolics-complex/81505
**Category:** General Usage
**Tags:** question, package
**Created:** [May 23, 2022, 12:16pm UTC](https://discourse.julialang.org/t/modelingtoolkit-symbolics-complex/81505 "2022-05-23T12:16:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Rohan\_Rajagopal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rohan_rajagopal/32/34183_2.png) [@Rohan\_Rajagopal](https://discourse.julialang.org/u/Rohan_Rajagopal)
#### Post date: [May 23, 2022, 12:16pm UTC](https://discourse.julialang.org/t/modelingtoolkit-symbolics-complex/81505/1 "2022-05-23T12:16:58Z")

</div>

Greetings everyone, I have recently started using ModelingToolkit.jl. I am facing the following error with exponentiation,

```julia
eqs_1 = [D(z1) ~ z1 * ( μ + im * ω_1 - abs(z1)) + A * ((cos(θ/ω_2) + im*sin(θ/ω_2)) * z2^μ),

        D(z2) ~ z2 * ( μ + im * ω_2 - abs(z2)) + A * ((cos(θ/ω_2) + im*sin(θ/ω_2)) * z1) ]

```

The error is being caused by the term z2^μ, error message is given below

```julia
MethodError: ^(::Complex{Num}, ::Num) is ambiguous. Candidates:
  ^(a::Number, b::Num) in Symbolics at 
julia/packages/SymbolicUtils/v2ZkM/src/methods.jl:71
  ^(z::Complex{T}, p::T) where T<:Real in Base at complex.jl:830
  ^(z::Complex{T}, p::S) where {T<:Real, S<:Real} in Base at complex.jl:843
Possible fix, define
  ^(::Complex{T}, ::Num) where T<:Real
Stacktrace:
 [1] top-level scope
   @ ~/Documents/Julia/Practice_modelling_tool_kit.jl:190

```

Is there a way to get around this error based on the suggestion?

Note there is no error if complex numbers are not involved in the exponents.

Is this due to the fact that Symbolics.jl are still being developed for complex symbolics?

Thank you.

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [May 23, 2022, 12:56pm UTC](https://discourse.julialang.org/t/modelingtoolkit-symbolics-complex/81505/2 "2022-05-23T12:56:34Z")

</div>

Yeah open an issue.

---

<div class="post-metadata">

### Author: ![Rohan\_Rajagopal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rohan_rajagopal/32/34183_2.png) [@Rohan\_Rajagopal](https://discourse.julialang.org/u/Rohan_Rajagopal)
#### Post date: [May 23, 2022, 1:12pm UTC](https://discourse.julialang.org/t/modelingtoolkit-symbolics-complex/81505/3 "2022-05-23T13:12:11Z")

</div>

Done, cheers!
