# Sympy Computation with dsolve for Logistic Differential Equation

**URL:** <https://discourse.julialang.org/t/sympy-computation-with-dsolve-for-logistic-differential-equation/104338>\
**Category:** General Usage\
**Tags:** question\
**Created:** [September 28, 2023, 7:48am UTC](https://discourse.julialang.org/t/sympy-computation-with-dsolve-for-logistic-differential-equation/104338 "2023-09-28T07:48:02Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![j\_verzani](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_verzani/32/8551_2.png) [@j\_verzani](https://discourse.julialang.org/u/j_verzani)\
**Post date:** [September 30, 2023, 4:02pm UTC](https://discourse.julialang.org/t/sympy-computation-with-dsolve-for-logistic-differential-equation/104338/4 "2023-09-30T16:02:32Z")

</div>

If you know the initial value, you should let SymPy do the work within dsolve:

```julia
using SymPy
@syms K, L, y(), t
∂ = Differential(t)
yt = dsolve(∂(y(t)) ~ K*y(t)*(L - y(t)), ics=Dict(y(0) => 800)) # equation of t; K, L
yt = rhs(yt) # work with just the expression, not the equation
yt = subs(yt, L=>2000, K => 3//10000) # leaves as an expression of t alone

```

The value of `yt` can be passed on to `plot` using the recipe, or after calling `lambdify` can be passed as a function to other actions.

The `ics` argument allows you to pass a dictionary, as shown.

The earlier answer suggested what to do if you knew the value of `C1` (find the variable, the substitute in for the known value). That isn’t suggested unless that is all you have to work with.

---

_[View the full topic](https://discourse.julialang.org/t/sympy-computation-with-dsolve-for-logistic-differential-equation/104338)._
