Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question
0

using logistic differential equatin (reproducing Ti Nspire CAS code)

asked 8 years ago

etb gravatar image

updated 8 years ago

I’m trying to reproduce some results from Ti Nspire CAS to use a differential equation. Only secondarily am I interested to actually solve the differential equation.

My Ti Nspire codes is as follows

deSolve(y = 2*10^(-5)*y(1500-y) and y(0) = 50, t, y)

and yields the following result

y = 1500*e^((3*t)/100) / (e^((3*t)/100) + 29)

image description

Can anyone give me a hit as to how I can do this in Sagemath?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 8 years ago

mforets gravatar image

updated 8 years ago

t = var('t')
y = function('y')(t)
ye = desolve(diff(y,t) == 2*10^(-5)*y*(1500-y), y, ics=[0,50])

ye = ye*3/100
yt = solve(ye.simplify_log(), y)
yt

[y(t)=1500e(3100t)e(3100t)+29]

Remark. Here I multiplied by 3/100, since otherwise the simplify_log() was not factoring the terms containing y(t). For instance,

f = 2*log(x) - 2*log(x-1)
f.simplify_log()

gives log(x2/(x1)2), but

f = 1/3*log(x) - 1/3*log(x-1)
f.simplify_log()

gives 13log(x1)+13log(x), instead of 13log(x/(x1)) (and in the first case I would prefer to get rather 2log(x/(x1)); neither factor() nor simplify_full() do it -- why?).

Preview: (hide)
link

Comments

Thanks a lot. I cannot answer your question, but I'll get back to you here if I find an answer to that.

etb gravatar imageetb ( 8 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 8 years ago

Seen: 763 times

Last updated: Jul 29 '16