Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: complex analysis problem in mathematica 3.0

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48495] Re: complex analysis problem in mathematica 3.0
  • From: "Roger L. Bagula" <rlbtftn at netscape.net>
  • Date: Wed, 2 Jun 2004 04:22:02 -0400 (EDT)
  • References: <c9hah5$18q$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Very good!
Finally something I can use in my minimal surfaces work.
I find that with really complex expressions
ComplexExpand and Simplify
can get "lost" ...
I had one the other day that used all my memory...
I gave the Kernal more, it used it, and still crashed...
I was doing an implicit surfaces derivation...
I can give you the formulas if you like , but it was an Expand
that got lost this time.

Anyone have a way around run away memory use?
David Park wrote:
> You can't use j. Use the Mathematica I.
> 
> step1 = 1/(s^3 + 2*s^2 + 2*s + 1) /. s -> I*w
> 
> Then you can separate into real and imaginary parts by using ComplexExpand.
> 
> step2 = ComplexExpand[step1]
> 1/((1 - 2*w^2)^2 + (2*w - w^3)^2) -
>   (2*w^2)/((1 - 2*w^2)^2 + (2*w - w^3)^2) +
>   I*(-((2*w)/((1 - 2*w^2)^2 + (2*w - w^3)^2)) +
>     w^3/((1 - 2*w^2)^2 + (2*w - w^3)^2))
> 
> But how do we further simplify that? We can't use Simplify or Together on
> the entire expression because that mixes the real and imaginary parts
> together again. We can get a partial simplification by mapping Simplify onto
> the parts.
> 
> step3 = Simplify /@ step2
> 1/(1 + w^6) - (2*w^2)/(1 + w^6) + (I*w*(-2 + w^2))/
>    (1 + w^6)
> 
> But the expression could be further simplified by using Together on the
> first two terms. Unfortunately Mathematica doesn't provide any direct method
> of doing that other than resorting to a rule that duplicates the parts on
> the lhs. I think that Mathematica needs an additional routine that would
> complement MapAt. I call it MapLevelParts and it maps a function to a subset
> of level parts in an expression. The common application would be to a subset
> of terms in a Plus expression or a subset of factors in a Times expression.
> 
> MapLevelParts::usage =
>     "MapLevelParts[function, {topposition, levelpositions}][expr] will map \
> the function onto the selected level positions in an expression. \
> Levelpositions is a list of the selected parts. The function is applied to \
> them as a group and they are replaced with a single new expression. Other \
> parts not specified in levelpositions are left unchanged.\nExample:\na + b +
> \
> c + d + e // MapLevelParts[f, {{2,4,5}}] -> a + c + f[b + d + e]";
> 
> MapLevelParts[func_,
>       part : {toppart___Integer?Positive,
>           subp : {_Integer?Positive, eprest__Integer?Positive}}][expr_] :=
>   Module[{work, subparts, npos, null, i, nnull = Length[{eprest}]},
>     work = func@Part[expr, Sequence @@ part];
>     subparts = Thread[{toppart, subp}];
>     newparts = {work, Table[null[i], {i, 1, nnull}]} // Flatten;
>     npos = Partition[Range[nnull + 1], 1];
>     ReplacePart[expr, newparts, subparts, npos] /. null[_] -> Sequence[]
>     ]
> 
> Now we can use Together on just the first two terms of the sum.
> 
> step3 // MapLevelParts[Together, {{1, 2}}]
> (1 - 2*w^2)/(1 + w^6) + (I*w*(-2 + w^2))/(1 + w^6)
> 
> David Park
> djmp at earthlink.net
> http://home.earthlink.net/~djmp/
> 
> 
> 
> 
> 
> 
> 
> 
> From: BranasMan [mailto:branasREmoVe at mail.inet.hr]
To: mathgroup at smc.vnet.net
> 
> i have a complex function:
> 
> H(s)=1 / (s^3 + 2s^2 + 2s + 1)
> 
> whan i replace "s" with j*w (j=sqrt(-1)) i get:
> 
> H=1 / (1 + j2w -2w^2 - jw^3)
> 
> i would like to get that function in shape of :
> H=something + j*something_else i.e. the complex
> and real part apart.
> 
> i played with Re and Im,but it seems that the fact that
> "w" is a variable confuses mathematica?!
> 
> i would reeeealy appreciate any help,and maybe perhaps some
> links for me to learn to use mathematica better.
> 
> 
> 
> 


  • Prev by Date: RE: RE: complex analysis problem in mathematica 3.0
  • Next by Date: Re: RE: complex analysis problem in mathematica 3.0
  • Previous by thread: RE: RE: complex analysis problem in mathematica 3.0
  • Next by thread: Re: RE: complex analysis problem in mathematica 3.0