Plotting Complex Functions.
Mostra commenti meno recenti

I intend to do a taylor series expansion at t=0. I would like to plot the coefficients of each Taylor term in the complex plane, using the surf function.
I tried Taylor(F) , Series (F) somewhere there is an error. The function is product of two gaussians, with two parameters mentioned above. This Gaussian contains other constants, Some are symbolic, while some have pre determined values.
Can some one help me out.
Thanks.
7 Commenti
Torsten
il 25 Ago 2024
You mean
alpha = alpha_r + 1i * alpha_i
with alpha_r, alpha_i being real numbers (not both of them 0) ?
Note that F is undefined at t = 0, the point at which you want to compute the Taylor expansion.
John D'Errico
il 25 Ago 2024
You have multiple constants in there with no value given. You say this yourself. You cannot plot something that is unkown.
At best, you can assign values to ALL of the constants, then plot to your hearts content.
David Goodmanson
il 26 Ago 2024
Since exp(-inf) = 0, I believe that F is well defined with F= 0 at t=0. A person might want to define it as a limit for increasingly large values of t, but that limit is 0. Unlike, say, sin(1/t) as t -->0.
Torsten
il 26 Ago 2024
Nothing is said about the signs of alpha_r, alpha_i or C.
Sudharsana
il 28 Ago 2024
Let us say I want to check the behavior of the function for

This is what I tried, I got the Taylor coefficients.
I want to integrate the coefficients of X in a complex plane (-5 to 5). How do i proceed?
syms Aa Bb Cc Dd x kr ki Omega Z
A=1;B=0.5;Phase1=0;C=1;
Omega=exp(1i*phase1)*A*sqrt(B)*C;
Aa=(-(kr)^2*abs(Omega)^2)./(1 + 2*Z*abs(Omega)^2);
Bb=(-(ki)^2*abs(Omega)^2)./(1 - 2*Z*abs(Omega)^2);
Cc=(1+2*Z*abs(Omega)^2 +2*abs(Omega)^2 )/(1 + 2*Z*abs(Omega)^2);
Dd=(1-2*Z *abs(Omega)^2 -2*abs(Omega)^2 )/(1 - 2*Z*abs(Omega)^2);
alpha =(kr^2+ki^2)*(Omega^2);
alphac =(kr^2-ki^2)*(Omega^2);
df = (1/(1-2*D*x))^(1/2)*(1/(1+2*C*x))^(1/2)*exp(A*(1+2*x)/(1+2*C*x))*exp(B*(1-2*x)/(1-2*D*x));
T =taylor(df,x,'order',10);
David Goodmanson
il 28 Ago 2024
Modificato: David Goodmanson
il 28 Ago 2024
Hi Sudharsana, could you comment on what the coefficients you show above are all about?
Sudharsana Iyengar
il 28 Ago 2024
Risposte (1)
David Goodmanson
il 26 Ago 2024
Modificato: David Goodmanson
il 28 Ago 2024
Hello Sudharsana,
Do you mean
f(t) = exp(-ar/(twC))*exp(-ai/(twC))
or
f(t) = exp(-ar/(twC))*exp(-i*ai/(twC))
^
(per Torsten's first comment)? Either way, this function has an essential singularity at t = 0 in the complex t plane. Assuming the lower line above is correct, which makes sense, then the first factor
exp(-(ar/wC)/t)
has the most to do with the behavior of the function at the origin. Assuming (ar/wC) is positive, then if you approach the origin from the right, the function f(t) and all its derivatives are zero at t = 0+. Since the coefficients of a Taylor series about a point are determined by the derivatives of f(t) at that point, this means that f(t) cannot be expanded in a Taylor series about t = 0. If (ar/wC) is negative then as you approach the origin from the from the right, f(t) --> infinity so again there is no Taylor series.
Which doesn't mean that it can't be approximated. For example, using exp(-1/t) for simplicity
t = 0:.001:4;
f = exp(-1./t);
c = polyfit(t,f,6)
f_fit = polyval(c,t);
I'm not advocating for polyfit which is anyway not a great idea for polynomials of large degree, and I am sure there are better fits but this is just one example.
Categorie
Scopri di più su Numerical Integration and Differentiation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!