Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7092
| From | Murat Havzalı <gezginorman@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: NDSolve[] |
| Date | 2011-12-10 12:39 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jbvjtu$j3o$1@smc.vnet.net> (permalink) |
| 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: NDSolve[]
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
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: NDSolve[] Murat Havzalı <gezginorman@gmail.com> - 2011-12-10 12:39 +0000
csiph-web