Re: NDSolve[]
- To: mathgroup at smc.vnet.net
- Subject: [mg123536] Re: NDSolve[]
- From: Murat Havzalı <gezginorman at gmail.com>
- Date: Sat, 10 Dec 2011 07:30:21 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201112091058.FAA03928@smc.vnet.net>
I think that is somewhat about the usage of the built-in function "derivative". What I understand from the "help" file, you have to define the function you want to take derivative of first, if you want to use the built-in function "derivative". The equivalent of the second one is as follows: NDSolve[{D[x[t], {t, 1}] == -y[t] - x[t]^2, D[y[t], {t, 1}] == 2*x[t] - y[t], x[0] == y[0] == 1}, {x, y}, {t, 10}] Which, supposedly gives the same answer as NDSolve[{x'[t] == -y[t] - x[t]^2, y'[t] == 2*x[t] - y[t], x[0] == y[0] == 1}, {x, y}, {t, 10}] Best, H -----Original Message----- Sent: Friday, December 09, 2011 12:58 PM Subject: [mg123536] NDSolve[] To: mathgroup at smc.vnet.net For the same equations, why does the first method as following give the error but the other one give the desired result? NDSolve[{Derivative[x[t], t] == -y[t] - x[t]^2, Derivative[y[t], t] == 2*x[t] - y[t], x[0] == y[0] == 1}, {x, y}, {t, 10}] NDSolve[{x'[t] == -y[t] - x[t]^2, y'[t] == 2*x[t] - y[t], x[0] == y[0] == 1}, {x, y}, {t, 10}] ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.1873 / Virus Database: 2102/4669 - Release Date: 12/09/11
- References:
- [no subject]
- From: "Steven M. Christensen" <steve@smc.vnet.net>
- [no subject]