Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13566 > unrolled thread

Re: Series Expansions in Mathematica

Started byBob Hanlon <hanlonr357@gmail.com>
First post2013-02-21 03:26 +0000
Last post2013-02-21 03:26 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Series Expansions in Mathematica Bob Hanlon <hanlonr357@gmail.com> - 2013-02-21 03:26 +0000

#13566 — Re: Series Expansions in Mathematica

FromBob Hanlon <hanlonr357@gmail.com>
Date2013-02-21 03:26 +0000
SubjectRe: Series Expansions in Mathematica
Message-ID<kg445a$r57$1@smc.vnet.net>
Manipulate[
 Module[
  {expr, expansion, approx, t1, t2, repl},
  repl = {t1 -> 0, t2 -> 0};
  expr = (Exp[4 x] - c Exp[3 y] Exp[4 x] + c - 1) x^t1 y^t2;
  Column[{
    Row[{Style["expansion = ", Bold], (expansion =
         Series[expr,
            {x, 0, maxOrder},
            {y, 0, maxOrder}] //
           Normal // Expand) /.
       repl}],
    Row[{Style["approx = ", Bold], approx = (Cases[expansion,
           a_. * x^n_ * y^m_ /;
            ((n + m) /. repl) <= maxOrder] //
          Total) /.
        repl}],
    ContourPlot[approx == 0,
     {x, -range, range}, {y, -range, range},
     FrameLabel -> {"x", "y"},
     ImageSize -> 300]},
   Alignment -> Center]],
 {{maxOrder, 5, "Max Order"}, Range[5]},
 {{range, .1, "Plot Range"}, .05, .75, .05,
  Appearance -> "Labeled"},
 {{c, 0.5}, -10, 10, 0.1,
  Appearance -> "Labeled"}]


Bob Hanlon


On Tue, Feb 19, 2013 at 6:53 PM, Samuel Mark Young <sy81@sussex.ac.uk> wrote:
> Hello,
> I am attempting to expand an equation, and then solve the 1st, 2nd, 3rd, 4th and 5th order expressions one at a time.
>
> The equation is:
>
> Exp[4 x] - c Exp[3 y] Exp[4 x] + c - 1 = 0
>
> With, x and y small variables to be expanded and c a constant. Once this is expanded, the variables x and y are in turn replaced with expansions written as:
>
> x = x[1] + x[2]/2 + x[3]/6 + x[4]/24 + x[5]/120 (to 5th order)
>
> By the time I have completed these expansions, I have a somewhat long expression. Does Mathematica have an intelligent way of deciding which terms would be 1st/2nd/etc order? For example, x[1] y[2] and x[1]^2 y[1] would both be third order.
>
> Many thanks,
> Sam Young
>
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web