# Revision history [back]

### logistic differential equation

Using:

y = function('y', x)
desolve(diff(y,x) == y(100-y), y)
results in: -1/100
log(y(x) - 100) + 1/100*log(y(x)) == _C + x

This is correct but not very helpful. I found out that "manually" feeding the answer above to solve() changing _C to a defined variable and the function y(x) for a variable and using the argument to_poly_solve=True gives the expected result: y == 100e^(100C + 100x)/(e^(100C + 100*x) - 1)

But I cannot get it to work in one calculation like this:

y = function('y', x)
de = diff(y,x) == y*(100-y)
sol=desolve(de,y)
print("Not so nice:")
sol
print("Better:")
solve(sol, y, to_poly_solve=True)

Would like to know:

a) Is there a way to get desolve or similar solver to return the y= answer directly?

b) If not a) how do I make the desolve -> solve calculation without manually rewriting the solution?

 2 No.2 Revision vdelecroix 6887 ●16 ●75 ●147 http://www.labri.fr/pe...

### logistic differential equation

Using:

y = function('y', x) x)<br>
desolve(diff(y,x) == y(100-y), y) y*(100-y), y)<br>


results in: -1/100log(y(x) in

-1/100*log(y(x) - 100) + 1/100*log(y(x)) == _C + xx


This is correct but not very helpful. I found out that "manually" feeding the answer above to solve() changing _C to a defined variable and the function y(x) for a variable and using the argument to_poly_solve=True gives the expected result: y == 100e^(100C + 100x)/(e^(100C + 100*x) - 1)

But I cannot get it to work in one calculation like this:

y = function('y', x) x)
de = diff(y,x) == y*(100-y)
sol=desolve(de,y) y*(100-y)
sol=desolve(de,y)
print("Not so nice:")
sol
print("Better:") nice:")
sol
print("Better:")
solve(sol, y, to_poly_solve=True) to_poly_solve=True)


Would like to know:

a) Is there a way to get desolve or similar solver to return the y= answer directly?

b) If not a) how do I make the desolve -> solve calculation without manually rewriting the solution?

 3 No.3 Revision vdelecroix 6887 ●16 ●75 ●147 http://www.labri.fr/pe...

### logistic differential equation

Using:

y = function('y', x)<br>
x)
desolve(diff(y,x) == y*(100-y), y)<br>
y)


results in

-1/100*log(y(x) - 100) + 1/100*log(y(x)) == _C + x


This is correct but not very helpful. I found out that "manually" feeding the answer above to solve() changing _C to a defined variable and the function y(x) for a variable and using the argument to_poly_solve=True gives the expected result: y == 100e^(100C + 100x)/(e^(100C + 100*x) - 1)

But I cannot get it to work in one calculation like this:

y = function('y', x)
de = diff(y,x) == y*(100-y)
sol=desolve(de,y)
print("Not so nice:")
sol
print("Better:")
solve(sol, y, to_poly_solve=True)


Would like to know:

a) Is there a way to get desolve or similar solver to return the y= answer directly?

b) If not a) how do I make the desolve -> solve calculation without manually rewriting the solution?