[Date Index]
[Thread Index]
[Author Index]
Re: error function
*To*: mathgroup at smc.vnet.net
*Subject*: [mg65996] Re: [mg65985] error function
*From*: Daniel Lichtblau <danl at wolfram.com>
*Date*: Wed, 26 Apr 2006 04:37:55 -0400 (EDT)
*References*: <200604250919.FAA07113@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
ann wrote:
> Hello everybody,
> I would be greatful if someone can help me with the following
> problem..
>
>
> i have a task of integrating a complicated funtion which upon
> execution gives the result with Erf[] how to get it solved.
>
> To say the problem in detail , i have to do the following operation
>
> Integrate[ (F^2 + C*G^2 ) * Real part of (F*complex conjugate of F *
> exp(I*theta) ] with the limits [-infinity to infinity] where F and G
> are of the form
>
> F=x1 * exp{ (-(t-x2)^2/x3^2 + i/2 * x4(t-xc) + i x4* (t-xc) + i x5 and
> g is of the same form with x replaced with y.
>
> now this results in the erf[of another complicated function]
>
> how to get it solved..or to how should i help mathematica to get it
> completely solved??
>
> expecting suggestions
>
> thankyou in advance
>
> ann.
I'm at a bit of a loss to understand what it is you tried to do, and
what you would like to see happen. What do you wish to solve? What was
your specific input? Output?
Let's start with something that might represent the integral you have in
mind, making certain assumptions in translating to viable Mathematica
format.
ff = x1 * Exp[-(t-x2)^2/x3^2 + I/2*x4*(t-xc) + I*x4*(t-xc) + I*x5]
gg = y1 * Exp[-(t-y2)^2/y3^2 + I/2*y4*(t-yc) + I*y4*(t-yc) + I*y5]
I assume i was meant as I(=Sqrt[-1]), and that t is the variable of
integration. Moreover where you use Exp[I*theta] I assume you had in
mind t (so effectively you will be taking a cosine transform). I also
assume that all constants are real valued and will impose that they are
positive to make the task easier for Integrate's proviso mechanism (I
did not check to see if this made a difference, either in speed or in
the result).
Then the integral can be found as below.
ii = Integrate[(ff^2+gg^2)*
ComplexExpand[Re[ff*Conjugate[ff]+gg*Conjugate[gg]]]*Cos[t],
{t,-Infinity,Infinity},
Assumptions->{x1>0,y1>0,x3>0,x2>0,y2>0,y3>0,x4>0,
y4>0,xc>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^2*(1 + 3*x4))*
Erf[Sqrt[((2*x2)/x3 + (I/4)*(x3 + 3*x3*x4))^2]]))/
(8*Sqrt[(8*x2 + I*x3^2*(1 + 3*x4))^2])
We'll check at a specific set of values for the parameters.
subs = {x1->1.1,y1->1.7,x3->0.4,x2->1.9,y2->0.2,y3->0.5,x4->0.8,
y4->1.6,xc->1.1,yc->0.8,x5->1.2,y5->0.9};
In[8]:= ii /. subs
Out[8]= 1.16009 - 2.10437 I
In[9]:= NIntegrate[(ff^2+gg^2)*
ComplexExpand[Re[ff*Conjugate[ff]+gg*Conjugate[gg]]]*Cos[t] /. subs,
{t,-Infinity,Infinity}]
Out[9]= 1.16009 - 2.10437 I
So it passes a basic sanity check.
In the development version of Mathematica I get a different, Erf-free
result:
(E^(I*x2*(-1 + 3*x4) - (x3 + 3*x3*x4)^2/16 + (2*I)*x5 - (3*I)*x4*xc)*
(E^((2*I)*x2) + E^((3*x3^2*x4)/4))*Sqrt[Pi]*x1^4*x3)/4 +
(E^(I*y2*(-1 + 3*y4) - (y3 + 3*y3*y4)^2/16 + (2*I)*y5 - (3*I)*y4*yc)*
(E^((2*I)*y2) + E^((3*y3^2*y4)/4))*Sqrt[Pi]*y1^4*y3)/4 +
((E^((3*x3^2*x4*y3^2)/(2*(x3^2 + y3^2))) +
E^(((2*I)*(x3^2*y2 + x2*y3^2))/(x3^2 + y3^2)))*Sqrt[Pi/2]*x1^2*x3*y1^2*
y3)/(2*E^((16*x2^2 - 8*x2*(4*y2 + I*(-1 + 3*x4)*y3^2) +
8*(2*y2^2 - I*(2*x5 - 3*x4*xc)*y3^2) +
x3^2*((-16*I)*x5 + (8*I)*y2 + y3^2 + 9*x4^2*y3^2 +
6*x4*((4*I)*xc - (4*I)*y2 + y3^2)))/(8*(x3^2 + y3^2)))*
Sqrt[x3^2 + y3^2]) + ((E^(((2*I)*(x3^2*y2 + x2*y3^2))/(x3^2 + y3^2)) +
E^((3*x3^2*y3^2*y4)/(2*(x3^2 + y3^2))))*Sqrt[Pi/2]*x1^2*x3*y1^2*y3)/
(2*E^((16*x2^2 - 8*x2*(4*y2 + I*y3^2*(-1 + 3*y4)) +
8*(2*y2^2 - I*y3^2*(2*y5 - 3*y4*yc)) +
x3^2*((-8*I)*y2*(-1 + 3*y4) + (y3 + 3*y3*y4)^2 +
(8*I)*(-2*y5 + 3*y4*yc)))/(8*(x3^2 + y3^2)))*Sqrt[x3^2 + y3^2])
It gives the same numeric value on substitution as above.
It is not clear to me if either of these results are what you seek but I
would guess they at least provide a start for either further computation
or refining the question.
Daniel Lichtblau
Wolfram Research
Prev by Date:
**Re: Periodic Rebirth of Hyperbolic Functions by ODE in Mathematica**
Next by Date:
**Re: NDSolve**
Previous by thread:
**error function**
Next by thread:
**Re: error function**
| |