Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #13024 > unrolled thread
| Started by | R Martinez <rm.tech@mac.com> |
|---|---|
| First post | 2013-01-05 07:17 +0000 |
| Last post | 2013-01-05 07:17 +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.
Re: How to get the Real and Imaginary part of an expression R Martinez <rm.tech@mac.com> - 2013-01-05 07:17 +0000
| From | R Martinez <rm.tech@mac.com> |
|---|---|
| Date | 2013-01-05 07:17 +0000 |
| Subject | Re: How to get the Real and Imaginary part of an expression |
| Message-ID | <kc8k24$b0u$1@smc.vnet.net> |
Eduardo, Two problems: (1) Mathematica does not know that s is a complex variable. (2) The functions Re[ ] and Im[ ] work only for numeric arguments. Try the following: ----- Clear[s, z, w, x, y] (w = 882.)/(s^2 + 2*z*w*s + w^2) f = % /. s -> x + I y ComplexExpand[%] ----------- HTH, Raul On Jan 2, 2013, at 6:16 PM, Eduardo M. A. M. Mendes <emammendes@gmail.com> wrote: > Hello > > I need to extract the real and imaginary part of the following expression > > (w=882)/(s^2+2*z*w*s+w^2) > > where w and z are positive constants. s is a complex variable. > > Applying Re and Im to the expression does not do much. By hand, one can easily find them. > > What am I missing? > > many thanks > > Ed > > > --Boundary_(ID_rnQ7W0VSrA7Op0O/vuqrsw) Content-type: text/html; CHARSET=US-ASCII Content-transfer-encoding: quoted-printable <html><head><meta http-equiv="Content-Type" content="text/html = charset=us-ascii"></head><body style="word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; = ">Eduardo,<div><br></div><div>Two problems:</div><div><br></div><div>(1) = Mathematica does not know that s is a complex = variable.</div><div><br></div><div>(2) The functions Re[ ] and Im[ ] = work only for numeric arguments.</div><div><br></div><div>Try the = following:</div><div><br></div><div>-----</div><div><div style="margin: = 0px; font-family: Helvetica; font-size: 16px; ">Clear[s, z, w, x, y]<br> (w = 882.)/(s^2 + 2*z*w*s + w^2)<br> <br> f = % /. s -> x + I y<br> <br> ComplexExpand[%]</div><div style="margin: 0px; font-family: Helvetica; = font-size: 16px; "><br></div><div style="margin: 0px; font-family: = Helvetica; font-size: 16px; ">-----------</div><div style="margin: = 0px; font-family: Helvetica; font-size: 16px; "><br></div><div = style="margin: 0px; font-size: 16px; font-family: Helvetica; = ">HTH,</div><div style="margin: 0px; font-size: 16px; font-family: = Helvetica; "><br></div><div style="margin: 0px; font-size: 16px; = font-family: Helvetica; ">Raul</div><div style="margin: 0px; = font-size: 12px; font-family: Helvetica; "><br></div><div><div>On Jan 2, = 2013, at 6:16 PM, Eduardo M. A. M. Mendes <<a = href="mailto:emammendes@gmail.com">emammendes@gmail.com</a>> = wrote:</div><br class="Apple-interchange-newline"><blockquote = type="cite">Hello<br><br>I need to extract the real and imaginary part = of the following = expression<br><br>(w=882)/(s^2+2*z*w*s+w^2)<br><br>where w and z are = positive constants. s is a complex variable.<br><br>Applying Re = and Im to the expression does not do much. By hand, one can = easily find them. <br><br>What am I missing?<br><br>many = thanks<br><br>Ed<br><br><br><br></blockquote></div><br></div></body></html= >= --Boundary_(ID_rnQ7W0VSrA7Op0O/vuqrsw)--
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web