using giac to solve differential equation with initial conditions
Publié : ven. janv. 13, 2023 8:41 am
Using giac 1.9-35. When I put the initial conditions in a variable first, then call desolve, it does not work.
If I put the initial conditions directly into the desolve command, it works. Why is that? Here is an example
Compare the above to the following
Why it fails in the second case? can't one put initial conditions in a variable and then use that variable in the call?
Am I doing something wrong?
--Nasser
If I put the initial conditions directly into the desolve command, it works. Why is that? Here is an example
Code : Tout sélectionner
>> ode:=diff(y(t),t)+y(t)=0
diff(y(t),t)+y(t)=0
>> desolve([ode,y(0)=1],y(t))
exp(-t)
Code : Tout sélectionner
6>> ode:=diff(y(t),t)+y(t)=0
diff(y(t),t)+y(t)=0
7>> ic:=y(0)=1
y(0)=1
8>> desolve([ode,ic],y(t))
[]
// Time 0
Am I doing something wrong?
--Nasser