Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5926
| From | Dan Dubin <ddubin@ucsd.edu> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | DSolve bug for complicated forcing functions in a 2nd order ODE |
| Date | 2011-10-27 10:39 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j8bcc7$8r6$1@smc.vnet.net> (permalink) |
Folks -- reporting a bug in DSolve, I think. The following Module solves
a 2nd order differential equation with periodic forcing, written as a
Fourier series. The number of Fourier coefficients kept in the series
is M. For M less than or equal to 40, the solution is correct, but for M
greater than 40 it starts to go wrong. Try M=41, for instance. The
resulting solution no longer satisfies the ODE. Any ideas what is
happening here?
PS[M_] := Module[{},
T = 1/2;
=CF=89[n_] = 2 Pi n/T;
f[n_] = 1/T Integrate[1 Exp[I =CF=89[n] t], {t, 0, 1/4}];
f[0] = Limit[f[n], n -> 0];
fapprox[t_] = Sum[f[n] Exp[-I =CF=89[n] t], {n, -M, M}];
s = DSolve[{x''[t] + 16 =CF=80^2 x[t] == fapprox[t], x[0] == 0, x'[0] == 0},
x[t], t];
xs[t_] = x[t] /. s[[1]];
xs''[t] + 16 Pi^2 xs[t] - fapprox[t] // Simplify]
Prof. Dan Dubin
Dept of Physics, UCSD La Jolla CA 92093-0319
858-534-4174 fax: 858-534-0173
ddubin@ucsd.edu
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
DSolve bug for complicated forcing functions in a 2nd order ODE Dan Dubin <ddubin@ucsd.edu> - 2011-10-27 10:39 +0000
csiph-web