# Can this equation be modeled by julia

**URL:** <https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527>\
**Category:** Offtopic\
**Created:** [May 23, 2022, 6:35pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527 "2022-05-23T18:35:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Achraf\_el\_fadli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/achraf_el_fadli/32/36477_2.png) [@Achraf\_el\_fadli](https://discourse.julialang.org/u/Achraf_el_fadli)\
**Post date:** [May 23, 2022, 6:35pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/1 "2022-05-23T18:35:15Z")

</div>

![Screenshot 2022-05-23 193439](https://global.discourse-cdn.com/julialang/original/3X/8/6/86859b08f3ceb50bd6797452325347885a781d33.jpeg)

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [May 23, 2022, 7:17pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/2 "2022-05-23T19:17:02Z")

</div>

Yes of course:

```julia
julia> -1/μ₀ * (∂/∂r) * (∂/r*∂r * (r * Eθ)) - 1/μ₀ ∂^2*Eθ/∂*z^2 + i*ω*σ*Eθ - i*ω*σ * sum(Vₖ/2π*r for i ∈ 1:7) = 0

```

(more seriously, you will need to provide quite a bit more context to get sensible advice here…)

---

<div class="post-metadata">

**Author:** ![xtalax](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xtalax/32/35293_2.png) [@xtalax](https://discourse.julialang.org/u/xtalax)\
**Post date:** [May 23, 2022, 7:22pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/3 "2022-05-23T19:22:15Z")

</div>

This looks like a PDE, you might want to look at [GitHub - SciML/MethodOfLines.jl: Automatic Finite Difference PDE solving with Julia SciML](https://github.com/SciML/MethodOfLines.jl). Please post an issue if you get stuck. As a note, you’ll need to seperate your equation in to real and imaginary parts for it to work at the moment.

---

<div class="post-metadata">

**Author:** ![Achraf\_el\_fadli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/achraf_el_fadli/32/36477_2.png) [@Achraf\_el\_fadli](https://discourse.julialang.org/u/Achraf_el_fadli)\
**Post date:** [May 23, 2022, 7:40pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/4 "2022-05-23T19:40:02Z")

</div>

for more context

 ![image](https://global.discourse-cdn.com/julialang/original/3X/5/7/57f595478eb7b1c4ab7fbfc1d924bab082c1d332.png)  
sorry it’s in french

---

<div class="post-metadata">

**Author:** ![Achraf\_el\_fadli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/achraf_el_fadli/32/36477_2.png) [@Achraf\_el\_fadli](https://discourse.julialang.org/u/Achraf_el_fadli)\
**Post date:** [May 23, 2022, 7:42pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/5 "2022-05-23T19:42:34Z")

</div>

what I found it difficult its expressing those integrals in julia

---

<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:** [May 23, 2022, 7:52pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/6 "2022-05-23T19:52:48Z")

</div>

But what do you try to achieve?

---

<div class="post-metadata">

**Author:** ![Achraf\_el\_fadli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/achraf_el_fadli/32/36477_2.png) [@Achraf\_el\_fadli](https://discourse.julialang.org/u/Achraf_el_fadli)\
**Post date:** [May 23, 2022, 7:54pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/7 "2022-05-23T19:54:04Z")

</div>

i want to vusualise Etheta

---

<div class="post-metadata">

**Author:** ![xtalax](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xtalax/32/35293_2.png) [@xtalax](https://discourse.julialang.org/u/xtalax)\
**Post date:** [May 23, 2022, 7:57pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/8 "2022-05-23T19:57:16Z")

</div>

Have you heard of quadrature? That is a useful technique for solving integrals. you could construct a quadrature matrix for the integral operators, rearrange and solve.

---

<div class="post-metadata">

**Author:** ![Achraf\_el\_fadli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/achraf_el_fadli/32/36477_2.png) [@Achraf\_el\_fadli](https://discourse.julialang.org/u/Achraf_el_fadli)\
**Post date:** [May 23, 2022, 7:58pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/9 "2022-05-23T19:58:40Z")

</div>

is it a lybrary on julia?

---

<div class="post-metadata">

**Author:** ![xtalax](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xtalax/32/35293_2.png) [@xtalax](https://discourse.julialang.org/u/xtalax)\
**Post date:** [May 23, 2022, 8:03pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/10 "2022-05-23T20:03:15Z")

</div>

There is [Quadrature.jl](https://github.com/SciML/Quadrature.jl), but I’m not sure that this will work for your use case.

What size do you expect the discretized `E_theta` to be?

---

<div class="post-metadata">

**Author:** ![Achraf\_el\_fadli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/achraf_el_fadli/32/36477_2.png) [@Achraf\_el\_fadli](https://discourse.julialang.org/u/Achraf_el_fadli)\
**Post date:** [May 23, 2022, 8:11pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/11 "2022-05-23T20:11:02Z")

</div>

10^-3

---

<div class="post-metadata">

**Author:** ![xtalax](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xtalax/32/35293_2.png) [@xtalax](https://discourse.julialang.org/u/xtalax)\
**Post date:** [May 23, 2022, 8:12pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/12 "2022-05-23T20:12:25Z")

</div>

Is E\_theta a function of some parameters, say `r, z, t`? I mean with what sized array will you approximate it?

---

<div class="post-metadata">

**Author:** ![Achraf\_el\_fadli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/achraf_el_fadli/32/36477_2.png) [@Achraf\_el\_fadli](https://discourse.julialang.org/u/Achraf_el_fadli)\
**Post date:** [May 23, 2022, 8:41pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/13 "2022-05-23T20:41:48Z")

</div>

E\theta independent to t

---

<div class="post-metadata">

**Author:** ![Achraf\_el\_fadli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/achraf_el_fadli/32/36477_2.png) [@Achraf\_el\_fadli](https://discourse.julialang.org/u/Achraf_el_fadli)\
**Post date:** [May 23, 2022, 8:59pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/14 "2022-05-23T20:59:01Z")

</div>

if i split the equation to real and imaginari parts does that doesn’t change the solution

---

<div class="post-metadata">

**Author:** ![xtalax](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xtalax/32/35293_2.png) [@xtalax](https://discourse.julialang.org/u/xtalax)\
**Post date:** [May 23, 2022, 9:00pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/15 "2022-05-23T21:00:44Z")

</div>

The solution is then `realpart + im*imagpart`

---

<div class="post-metadata">

**Author:** ![Achraf\_el\_fadli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/achraf_el_fadli/32/36477_2.png) [@Achraf\_el\_fadli](https://discourse.julialang.org/u/Achraf_el_fadli)\
**Post date:** [May 23, 2022, 9:03pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/16 "2022-05-23T21:03:12Z")

</div>

![image](https://global.discourse-cdn.com/julialang/original/3X/9/1/91f6c4f403bbb13c6551607ee1906acd53a5aa0e.png)  
it does’nt work

---

<div class="post-metadata">

**Author:** ![xtalax](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xtalax/32/35293_2.png) [@xtalax](https://discourse.julialang.org/u/xtalax)\
**Post date:** [May 23, 2022, 9:08pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/17 "2022-05-23T21:08:00Z")

</div>

Read the docs carefully, you will note that that’s not how the differential operators are used. You also need to supply the fact that  
`E_theta` has `r, z` dependence. Again, consult the docs. There are also a lot of undefined variables used in that equation.

---

<div class="post-metadata">

**Author:** ![Achraf\_el\_fadli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/achraf_el_fadli/32/36477_2.png) [@Achraf\_el\_fadli](https://discourse.julialang.org/u/Achraf_el_fadli)\
**Post date:** [May 23, 2022, 9:14pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/18 "2022-05-23T21:14:41Z")

</div>

i have to send it by 12 pm  
idon know how to visualise it

---

<div class="post-metadata">

**Author:** ![Achraf\_el\_fadli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/achraf_el_fadli/32/36477_2.png) [@Achraf\_el\_fadli](https://discourse.julialang.org/u/Achraf_el_fadli)\
**Post date:** [May 23, 2022, 9:15pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/19 "2022-05-23T21:15:04Z")

</div>

please help me

---

<div class="post-metadata">

**Author:** ![xtalax](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xtalax/32/35293_2.png) [@xtalax](https://discourse.julialang.org/u/xtalax)\
**Post date:** [May 23, 2022, 9:27pm UTC](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527/20 "2022-05-23T21:27:29Z")

</div>

If this is an assignment, this is the wrong way of going about solving it. Your professor will have given you material that can be used to help find a solution, I suggest that you consult your notes. And in future, if you want help with solutions, as mentioned above, you really need to provide more context.

[Next page](https://discourse.julialang.org/t/can-this-equation-be-modeled-by-julia/81527.md?page=2)
