Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12779
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Clean output of mathematica |
| Date | 2012-12-13 09:07 +0000 |
| Message-ID | <kac5sq$sn0$1@smc.vnet.net> (permalink) |
| References | <20121212005617.818F1691F@smc.vnet.net> |
| Organization | Time-Warner Telecom |
s = DSolve[
{y''[x] == -a^2 y[x], y[0] == 0},
y, x][[1]] /. C[2] -> 2;
t = {Factor[a /.
Solve[#, a][[1]] & /@
Simplify[
Reduce[{(y[L] /. s) == 0, L != 0}, a],
{Element[C[1], Integers],
L != 0}]] /.
(2 C[1] x_ || (2 C[1] + 1) x_) :> n*x}
{(n*Pi)/L}
Bob Hanlon
On Tue, Dec 11, 2012 at 7:56 PM, AZEEM MIR <docpasmon@gmail.com> wrote:
> Dear All
> Following code solves the 2nd order differential equation.
>
> s = DSolve[{y''[x] == - a^2 y[x]}, y, x]
> t = Reduce[y[0] == 0 && y[L] == 0 && C[1] == 0 && C[2] ==
= 2 /. s, a]
>
> These give output
>
> {{y->({x}\[Function]Subscript[c, 2] sin(a x)+Subscript[c, 1] cos(a x))}}
>
> Subscript[c, 3]\[Element]\[DoubleStruckCapitalZ]\[And]((Subscript[c, 1]\[LongEqual]0\[And]Subscript[c, 2]\[LongEqual]2\[And](L\[LongEqual]0\[Or](L!=0\[And]a\[LongEqual](2 \[Pi] Subscript[c, 3])/L)))\[Or](L!=0\[And]Subscript[c, 1]\[LongEqual]0\[And]Subscript[c, 2]\[LongEqual]2\[And]a\[LongEqual](\[Pi] (2 Subscript[c, 3]+1))/L))
>
> Now it is possible to extract the possible eigen values of a but that is not efficient automation. I wish to write a program that effectively plots eigenvalues solution without customizing the extract command each time.
>
> Is it possible to produce a clean output like all possible eigen-values enclosed by bracket defined by just{n Pi/L}. Sure it won't be so hard to overwrite some basic files.
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Clean output of mathematica Bob Hanlon <hanlonr357@gmail.com> - 2012-12-13 09:07 +0000
csiph-web