# The julia expression of only one equation with two variables

**URL:** <https://discourse.julialang.org/t/the-julia-expression-of-only-one-equation-with-two-variables/111916>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [March 21, 2024, 5:57am UTC](https://discourse.julialang.org/t/the-julia-expression-of-only-one-equation-with-two-variables/111916 "2024-03-21T05:57:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![whucsu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/whucsu/32/207015_2.png) [@whucsu](https://discourse.julialang.org/u/whucsu)\
**Post date:** [March 21, 2024, 5:57am UTC](https://discourse.julialang.org/t/the-julia-expression-of-only-one-equation-with-two-variables/111916/1 "2024-03-21T05:57:42Z")

</div>

I get one simulation with only one expression below:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/c/6cfe24f09b37b2e38914a234b69433faeddcb6df.png)  
the P(t) and Q(t) with their derivative are the expected, all the R，C are known parameters.  
suppose the initial values are known ,but I don’t know how to define the ode in julia for using ODEProblem() . please share some suggestions.  
thanks.

---

<div class="post-metadata">

**Author:** ![RomeoV](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/romeov/32/37687_2.png) [@RomeoV](https://discourse.julialang.org/u/RomeoV)\
**Post date:** [March 21, 2024, 9:41am UTC](https://discourse.julialang.org/t/the-julia-expression-of-only-one-equation-with-two-variables/111916/2 "2024-03-21T09:41:47Z")

</div>

I think this is rather a mathematical question than a Julia question, and perhaps a homework question at that? Can you rewrite the equation as a system of equations where the left-hand side only contains therms like \frac{d X(t)}{d t} and the right hand side doesn’t contain time derivatives (i.e. only terms like X(t))? You may need to introduce auxiliary variables. Once you’ve managed that, setting up the `ODEProblem` should be easier. Good luck!

---

<div class="post-metadata">

**Author:** ![whucsu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/whucsu/32/207015_2.png) [@whucsu](https://discourse.julialang.org/u/whucsu)\
**Post date:** [March 22, 2024, 4:14am UTC](https://discourse.julialang.org/t/the-julia-expression-of-only-one-equation-with-two-variables/111916/3 "2024-03-22T04:14:37Z")

</div>

thanks, I solved it.
