Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

restart;


K := -3;
                               -3
m := 1;
                               1
w := -4*K;
                               12
alpha[0] := -2;
                               -2
alpha[1] := 0;
                               0
a := 2;
                               2
b := 3;
                               3
                               1
beta[1] := (12*(m^2+K))/(a+b);
                              -24
                              ---
                               5 
xi := -t*w+x+y;
                         -12 t + x + y

F := -sqrt(-K)*tanh(sqrt(-K)*xi);
                (1/2)     / (1/2)                \
              -3      tanh\3      (-12 t + x + y)/
U := alpha[0]+alpha[1]*(m+F)+beta[1]/(m+F);
                                 24                     
        -2 - -------------------------------------------
               /     (1/2)     / (1/2)                \\
             5 \1 - 3      tanh\3      (-12 t + x + y)//
                               1
y := 0;
                               0

plot3d(U, x = -10 .. -10, t = -10 .. 10);

t := 0;
                               0
plot(U, x = -10 .. 10);

RootOf(_Z^2*beta*h[1]-alpha*l[1]*l[2], label = _L2)

Hi I have the following ln function that I want to differentiate wrt variable c:

 

I2 := -sqrt(-c^2+1)*ln(abs((.9*sqrt(-c^2+1)-c*sqrt(1-.9^2))/(-.9*sqrt(-c^2+1)-c*sqrt(1-.9^2))))

 

When I differentiate I obtain an expression that involves 

...abs(1, (.9*sqrt(-c^2+1)-.4358898944*c)/(-.9*sqrt(-c^2+1)-.4358898944*c))...

Why does it give a comma at the abs expression? how to get rid of that.

Hello everyone,

I have a function of 5 variables, A, P, N, k. I want to solve and express as a power series of 'k'

w=F*k+G+H/k+...

and gather the coefficients of each power.

However, the result I obtain in my code differs from the analytical value I found. What am I doing wrong?

Thanks!

collect_mp.mw

How to get a plot for different values of Mh.

like Mh=[1 2 3 4]

Code:

restart;
with(DEtools,odeadvisor);

m:=10;H:=1;Mh:=1;b:=0.02; a:=0.05;V:=array(0..m); V[0]:=1-exp(-t);

for k from 1 to m do

if k=1 then chi:=0;

 chi:=1;

 fi;

 p:=0;

 for j from 0 to k-1 do

   p:=p+(V[k-1-j]*diff(V[j],t$2)-diff(V[k-1-j],t)*diff(V[j],t)-a*(2*diff(V[k-1-j],t)*diff(V[j],t$3)-diff(V[k-1-j],t$2)*diff(V[j],t$2)-V[k-1-j]*diff(V[j],t$4)));  od;

p:=(p+diff(V[k-1],t$3)-b*(diff(V[k-1],t$2)+t*diff(V[k-1],t$3))-Mh*diff(V[k-1],t))*h*H;

p:=factor(p);

V[k]:=(-int(p,t)+0.5*exp(t)*int(exp(-t)*p,t)+0.5*exp(-t)*int(exp(t)*p,t)+chi*V[k-1]+C1+C3*exp(-t));

v:=unapply(V[k],t);

V[k]:=frontend(expand,[V[k]]);  V[k]:=subs(C3=solve(eval(subs(t=0,diff(V[k],t))),C3),V[k]); V[k]:=frontend(expand,[V[k]]);

V[k]:=subs(C1=solve(eval(subs(t=0,-V[k]-diff(V[k],t))),C1),V[k]);

od:

appr:=0;

for k from 0 to m do

 appr:=appr+V[k];

od:

u_appr:=unapply(appr,(h,t)):

u_appr_1:=unapply(diff(u_appr(h,t),t),(h,t)):

evalf(u_appr_1(-0.4,t)):

with(plots);

plot([u_appr_1(-0.4,t)],t=0..4,0..1.2,color=[black],axes=frame):

 

 

this plot for Mh=1:

 

How to apply two for loops to solve ode problem.

code:

restart; with(plots); fcns := {T(eta), f(eta)};
m := .5; bet := 1; na := 1/6; N := 5;
eq1 := (diff(f(eta), `$`(eta, 3)))*pr+m-m*(diff(f(eta), `$`(eta, 1)))+((m+1)*(1/2))*(diff(f(eta), `$`(eta, 2)))*f(eta) = 0;
eq2 := diff(T(eta), `$`(eta, 2))+((m+1)*(1/2))*(diff(T(eta), `$`(eta, 1)))*f(eta) = 0;
bc := f(0) = 0, (D(f))(0) = 0, (D(f))(N) = 1, (D(T))(0) = -bi*(1-T(0)), T(N) = 0;
bi:= [seq(1..4,0.1)];  NN := nops(bi);  
pr:=[seq(1..2,0.1)];  NN1 := nops(pr);
for i  from 1 to NN do    
for j from 1 to NN1 do  

R := dsolve(eval({bc, eq1,eq2}, bi[i],pr[j]), fcns, type = numeric, method = bvp[midrich], maxmesh=2400):  
X1||[i,j]:=rhs(-R(0)[3]):
end do:  
end do:  

Have a good day.
 

I am trying to expand a multivariable (more specifically 4 variables) function in powers of one of its variables when it goes to infinity.

However, the result I get is always zero, even if I input (or not) values for some of the other variables.

Can anybody help?

series_expansion.mw

P.s.: I want to do the same for the other two functions I defined in the worksheet as well.


 

restart; _local(gamma); _local(I); m := 3; A := 10; delta := .112; rho := .23; beta := 1.4; alpha := 2.1; gamma := 1.02; q := 2.3; b1 := 50; b2 := 10; b3 := 5; b4 := 20; S(0) := b1; B(0) := b2; V(0) := b3; R(0) := b4; mu := .13; i = 1; for k from 0 to m do S(k+1) := (A*delta*k-(rho+mu)*S(k)-beta*(sum(S(m)*B(j-m), j = 0 .. m)))/(k+1); B(k+1) := -(-(mu+alpha+gamma)*B(k)+beta*(sum(S(m)*B(j-m), j = 0 .. m)))/(k+1); V(k+1) := (rho*S(k)-(1-q)*S(k)-mu*V(k))/(k+1); R(k+1) := (gamma*B(k)-mu*R(k))/(k+1) end do; s := sum(S(kk)*t^kk, kk = 0 .. m); b := sum(B(kk)*t^kk, kk = 0 .. m); v := sum(V(kk)*t^kk, kk = 0 .. m); r := sum(R(kk)*t^kk, kk = 0 .. m); SS(0) := s; BB(0) := b; VV(0) := v; RR(0) := r; S(0) := subs(t = T(i), s); B(0) := subs(t = T(i), b); V(0) := subs(t = T(i), v); R(0) := subs(t = T(i), r)

I

 

Warning, The imaginary unit, I, has been renamed _I

 

3

 

10

 

.112

 

.23

 

1.4

 

2.1

 

1.02

 

2.3

 

50

 

10

 

5

 

20

 

50

 

10

 

5

 

20

 

.13

 

i = 1

 

-18.00-1.4*S(3)*B(-3)-1.4*S(3)*B(-2)-1.4*S(3)*B(-1)-14.0*S(3)

 

32.50-1.4*S(3)*B(-3)-1.4*S(3)*B(-2)-1.4*S(3)*B(-1)-14.0*S(3)

 

75.85

 

7.60

 

3.800000000-.4480000000*S(3)*B(-3)-.4480000000*S(3)*B(-2)-.4480000000*S(3)*B(-1)-4.480000000*S(3)

 

52.81250000-2.975000000*S(3)*B(-3)-2.975000000*S(3)*B(-2)-2.975000000*S(3)*B(-1)-29.75000000*S(3)

 

-18.70025000-1.071000000*S(3)*B(-3)-1.071000000*S(3)*B(-2)-1.071000000*S(3)*B(-1)-10.71000000*S(3)

 

16.08100000-.7140000000*S(3)*B(-3)-.7140000000*S(3)*B(-2)-.7140000000*S(3)*B(-1)-7.140000000*S(3)

 

.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3)

 

55.85709723-1.296018889*S(3)*B(-3)-1.296018889*S(3)*B(-2)-1.296018889*S(3)*B(-1)-12.96018889*S(3)-.4666666667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-.4666666667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-.4666666667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)

 

2.748344167-.1820700000*S(3)*B(-3)-.1820700000*S(3)*B(-2)-.1820700000*S(3)*B(-1)-1.820700000*S(3)

 

17.25940667-.9805600000*S(3)*B(-3)-.9805600000*S(3)*B(-2)-.9805600000*S(3)*B(-1)-9.805600000*S(3)

 

-.2034933335+1.482334934*S(3)*B(-3)+1.482334934*S(3)*B(-2)+1.482334934*S(3)*B(-1)+14.82334934*S(3)-.3500000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-.3500000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-.3500000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)

 

44.36655818+.3921579862*S(3)*B(-3)+.3921579862*S(3)*B(-2)+.3921579862*S(3)*B(-1)+3.921579862*S(3)-.7291666668*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-.7291666668*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-.7291666668*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)

 

0.2185881458e-1-.1520195250*S(3)*B(-3)-.1520195250*S(3)*B(-2)-.1520195250*S(3)*B(-1)-1.520195250*S(3)

 

13.68262908-.2986166168*S(3)*B(-3)-.2986166168*S(3)*B(-2)-.2986166168*S(3)*B(-1)-2.986166168*S(3)-.1190000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-.1190000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-.1190000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)

 

50+(-22.06933333-1.4*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-1.4*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-1.4*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)+5.780693334*S(3)*B(-3)+5.780693334*S(3)*B(-2)+5.780693334*S(3)*B(-1)+57.80693334*S(3))*T(i)+(2.497813333-.4480000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-.4480000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-.4480000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)+1.849821867*S(3)*B(-3)+1.849821867*S(3)*B(-2)+1.849821867*S(3)*B(-1)+18.49821867*S(3))*T(i)^2+(-.9095153783-.4129066667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-.4129066667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-.4129066667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)+1.704919154*S(3)*B(-3)+1.704919154*S(3)*B(-2)+1.704919154*S(3)*B(-1)+17.04919154*S(3))*T(i)^3

 

10+(28.43066667-1.4*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-1.4*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-1.4*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)+5.780693334*S(3)*B(-3)+5.780693334*S(3)*B(-2)+5.780693334*S(3)*B(-1)+57.80693334*S(3))*T(i)+(44.16516667-2.975000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-2.975000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-2.975000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)+12.28397333*S(3)*B(-3)+12.28397333*S(3)*B(-2)+12.28397333*S(3)*B(-1)+122.8397333*S(3))*T(i)^2+(52.09000233-1.296018889*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-1.296018889*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-1.296018889*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)+5.351348394*S(3)*B(-3)+5.351348394*S(3)*B(-2)+5.351348394*S(3)*B(-1)+53.51348394*S(3)-.4666666667*(-.9095153783-.4129066667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-.4129066667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-.4129066667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)+1.704919154*S(3)*B(-3)+1.704919154*S(3)*B(-2)+1.704919154*S(3)*B(-1)+17.04919154*S(3))*B(-3)-.4666666667*(-.9095153783-.4129066667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-.4129066667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-.4129066667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)+1.704919154*S(3)*B(-3)+1.704919154*S(3)*B(-2)+1.704919154*S(3)*B(-1)+17.04919154*S(3))*B(-2)-.4666666667*(-.9095153783-.4129066667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-.4129066667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-.4129066667*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)+1.704919154*S(3)*B(-3)+1.704919154*S(3)*B(-2)+1.704919154*S(3)*B(-1)+17.04919154*S(3))*B(-1))*T(i)^3

 

5+75.85*T(i)+(-21.81329000-1.071000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-1.071000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-1.071000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)+4.422230400*S(3)*B(-3)+4.422230400*S(3)*B(-2)+4.422230400*S(3)*B(-1)+44.22230400*S(3))*T(i)^2+(2.219127367-.1820700000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-.1820700000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-.1820700000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)+.7517791681*S(3)*B(-3)+.7517791681*S(3)*B(-2)+.7517791681*S(3)*B(-1)+7.517791681*S(3))*T(i)^3

 

20+7.60*T(i)+(14.00564000-.7140000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-.7140000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-.7140000000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)+2.948153600*S(3)*B(-3)+2.948153600*S(3)*B(-2)+2.948153600*S(3)*B(-1)+29.48153600*S(3))*T(i)^2+(14.40924560-.9805600000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-3)-.9805600000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-2)-.9805600000*(.2906666667-.4129066667*S(3)*B(-3)-.4129066667*S(3)*B(-2)-.4129066667*S(3)*B(-1)-4.129066667*S(3))*B(-1)+4.048797611*S(3)*B(-3)+4.048797611*S(3)*B(-2)+4.048797611*S(3)*B(-1)+40.48797611*S(3))*T(i)^3

(1)


 

Download badSums2.mw

Dear friends,

Greetings.

How to get the second solution.

how to change the guess value in maple.

figure 1 plot in Matlab with two different initial guesses.

 

TWOSOLUTION.mw

 



 

Hi,

Due to an unexpected maintenance operation, I had to uninstall Maple 18 from my Windows 7-64 bit PC.

Later on I installed it without any problems but, to my surprise now I can't configure it properly. This is:

* Enabling Maple Text as Input (classical input method)
* Removing numbers from equations
* Setting Maple language to English (it took Spanish by default because of Windows)
* Hiding left panel

As usual, this is performed under Tools/Options/Interface and so on...

After I modify my preferred settings, apply globally and close-open again, the program is again in its original form.

How can I do in this case? I have installed it several times. It is also worth noting that the maintenance that I performed was related to deep Windows registry modifications. 

Thanks and regards.

 

I have a PDE system that relates four functions: sht1, svt1, Lt1, Jirt1.

I'm trying to solve this system numerically, but the pdsolve command returns an error (this error does not make sense to me).

Where am I going wrong?

Thanks!

Test.mw

restart;
T := -S(xi)*S(xi)+mu*R(xi)-lambda;
                        2                    
                  -S(xi)  + mu R(xi) - lambda
Q := -S(xi)*R(xi);
                          -S(xi) R(xi)
u := a[0]+a[1]*S(xi)+b[1]*R(xi);
                 a[0] + a[1] S(xi) + b[1] R(xi)
diff(u, xi);
                  / d        \        / d        \
             a[1] |---- S(xi)| + b[1] |---- R(xi)|
                  \ dxi      /        \ dxi      /
Fr := Q*b[1]+T*a[1];
                         /      2                    \     
     -S(xi) R(xi) b[1] + \-S(xi)  + mu R(xi) - lambda/ a[1]
diff(Fr, xi);
       / d        \                    / d        \     
      -|---- S(xi)| R(xi) b[1] - S(xi) |---- R(xi)| b[1]
       \ dxi      /                    \ dxi      /     

           /         / d        \      / d        \\     
         + |-2 S(xi) |---- S(xi)| + mu |---- R(xi)|| a[1]
           \         \ dxi      /      \ dxi      //     
d := -T*R(xi)*b[1]-S(xi)*Q*b[1]+(-2*S(xi)*T+mu*Q)*a[1];
 /      2                    \                   2           
-\-S(xi)  + mu R(xi) - lambda/ R(xi) b[1] + S(xi)  R(xi) b[1]

     /         /      2                    \                 \   
   + \-2 S(xi) \-S(xi)  + mu R(xi) - lambda/ - mu S(xi) R(xi)/ a[

  1]
diff(d, xi);
 /         / d        \      / d        \\           
-|-2 S(xi) |---- S(xi)| + mu |---- R(xi)|| R(xi) b[1]
 \         \ dxi      /      \ dxi      //           

     /      2                    \ / d        \     
   - \-S(xi)  + mu R(xi) - lambda/ |---- R(xi)| b[1]
                                   \ dxi      /     

                        / d        \        2 / d        \        /
   + 2 S(xi) R(xi) b[1] |---- S(xi)| + S(xi)  |---- R(xi)| b[1] + |
                        \ dxi      /          \ dxi      /        \
   / d        \ /      2                    \
-2 |---- S(xi)| \-S(xi)  + mu R(xi) - lambda/
   \ dxi      /                              

             /         / d        \      / d        \\
   - 2 S(xi) |-2 S(xi) |---- S(xi)| + mu |---- R(xi)||
             \         \ dxi      /      \ dxi      //

        / d        \                  / d        \\     
   - mu |---- S(xi)| R(xi) - mu S(xi) |---- R(xi)|| a[1]
        \ dxi      /                  \ dxi      //     
h := -(-2*S(xi)*T+mu*Q)*R(xi)*b[1]-(-S(xi)^2+mu*R(xi)-lambda)*Q*b[1]+2*S(xi)*R(xi)*b[1]*T+S(xi)^2*Q*b[1]+(-2*T*(-S(xi)^2+mu*R(xi)-lambda)-2*S(xi)*(-2*S(xi)*T+mu*Q)-mu*T*R(xi)-mu*S(xi)*Q)*a[1];
 /         /      2                    \                 \       
-\-2 S(xi) \-S(xi)  + mu R(xi) - lambda/ - mu S(xi) R(xi)/ R(xi) 

           /      2                    \                 
  b[1] + 3 \-S(xi)  + mu R(xi) - lambda/ S(xi) R(xi) b[1]

                         /                                2         
          3              |   /      2                    \          
   - S(xi)  R(xi) b[1] + \-2 \-S(xi)  + mu R(xi) - lambda/  - 2 S(xi

    /         /      2                    \                 \
  ) \-2 S(xi) \-S(xi)  + mu R(xi) - lambda/ - mu S(xi) R(xi)/

                                                             \   
        /      2                    \                 2      |   
   - mu \-S(xi)  + mu R(xi) - lambda/ R(xi) + mu S(xi)  R(xi)/ a[

  1]
collect(expand(h+3*Fr*Fr+(4*omega+3)*Fr), S(xi), R(xi));
     /      2         \      4
R(xi)\3 a[1]  - 6 a[1]/ S(xi) 

                                                  3        /  
   + R(xi)(6 R(xi) a[1] b[1] - 6 b[1] R(xi)) S(xi)  + R(xi)\3 

       2     2                  2                   
  R(xi)  b[1]  - 6 R(xi) mu a[1]  + 12 a[1] mu R(xi)

                  2                                        \ 
   + 6 lambda a[1]  - 8 a[1] lambda - 4 omega a[1] - 3 a[1]/ 

       2        /        2                       2        
  S(xi)  + R(xi)\-6 R(xi)  mu a[1] b[1] + 6 R(xi)  mu b[1]

   + 6 R(xi) lambda a[1] b[1] - 5 R(xi) lambda b[1]

                                      \              /      2   2 
   - 4 R(xi) omega b[1] - 3 b[1] R(xi)/ S(xi) + R(xi)\3 a[1]  mu  

       2            2      2         2                
  R(xi)  - 3 a[1] mu  R(xi)  - 6 a[1]  mu R(xi) lambda

   + 5 a[1] mu R(xi) lambda + 4 omega a[1] mu R(xi)

           2       2                                  2
   + 3 a[1]  lambda  + 3 a[1] mu R(xi) - 2 a[1] lambda 

                                        \
   - 4 omega a[1] lambda - 3 a[1] lambda/

 

 

Hello;

 I am trying to verify the analytic solution of a electric and magnetic fields created by a small dipole antenna (also called "Hertzian dipole"). The study of a small dipole is ground zero of anyone learning about antennas as calculations are "relatively" easy if a mathematical software is used. As the title suggests, the fieldplot3d returns an empty box.

Here is some introduction for the problem in question:

 The procedure is relatively straightforward, first, current density vector is defined, from there, magnetic vector potential (named "vector A") is calculated. The curl of vector A gives the magnetic field (named "B-field") produced by the antenna. From B-field, H field is deduced as it is only a multiplication of the B-field by a constant.

 At this point, I try to plot the H-field, and it works like a charm. No problem at all.

The electric field (named "E-field") then, may be calculated by taking the curl of the H-field and multiplying by a constant.

 At this second point, I try to plot the E-field, however, Maple returns an empty box. 

First, I thaught, maybe it was a problem of division by 0, however, after redefining the axis ranges, the problem still persists. I am attaching the code and the images. Any help will be greatly appreciated.

PS: This is my first post and I am very new to maple, please indulgde me if I make some formatting and/or post mistakes

 

KB

First step: Verify calculations for Hertzian dipole

 

restart;

with(plots):

with(LinearAlgebra):

with(VectorCalculus):

#IMPORTANT: R is constant for the calculation of A

 

 

 

J:=Vector[column]([ 0 ,
                 0 ,
                 I_0/s ]);

J := I_0*e[z]/s

(1)

 

A := VectorCalculus:-`*`(VectorCalculus:-`*`(mu_0, 1/VectorCalculus:-`*`(4, Pi)), int(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(J, exp(VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(I, k), R)))), s), 1/R), z = VectorCalculus:-`-`(VectorCalculus:-`*`(l, 1/2)) .. VectorCalculus:-`*`(l, 1/2)))

A := (1/4)*mu_0*exp(-I*k*R)*I_0*l*e[z]/(Pi*R)

(2)

A[1];

0

(3)

A[2];

0

(4)

A[3];

(1/4)*mu_0*exp(-I*k*R)*I_0*l/(Pi*R)

(5)

#Taking the curl of A:

#IMPORTANT: R is a function of x,y,z:

R:=sqrt(x^2+y^2+z^2);

(x^2+y^2+z^2)^(1/2)

(6)

 

 

 

#Defining B by taking the curl

B[1] := VectorCalculus:-`+`(diff(A[3], y), VectorCalculus:-`-`(diff(A[2], z))):

 

 

B[2] := VectorCalculus:-`-`(VectorCalculus:-`+`(diff(A[3], x), VectorCalculus:-`-`(diff(A[1], z)))):

 

 

B[3] := VectorCalculus:-`+`(diff(A[2], x), VectorCalculus:-`-`(diff(A[1], y))):

B:=Vector[column]([ B[1] ,
                 B[2] ,
                 B[3] ]):

 

 

mu_0:=4*Pi*10^(-7):

I_0:=2400:

f:=2500:

omega:=2*Pi*f:

c:=3*10^8:

k:=omega/c:

l:=3*10^(-2):

epsilon_0:=1/(mu_0*c^2):

 

 

 

B_plot:=fieldplot3d([B[1],B[2],B[3]], x=-1..1,y=-1..1,z=-1..1,fieldstrength=log,arrows=SLIM):

 

 

H:=(1/mu_0)*B:

 

H_plot:=fieldplot3d([H[1],H[2],H[3]], x=-1..1,y=-1..1,z=-1..1,fieldstrength=log,arrows=SLIM):

 

# Taking curl of H to find the E field:

 

E[1] := VectorCalculus:-`*`(1/VectorCalculus:-`*`(VectorCalculus:-`*`(I, omega), epsilon_0), VectorCalculus:-`+`(diff(H[3], y), VectorCalculus:-`-`(diff(H[2], z)))):

E[2] := VectorCalculus:-`*`(1/VectorCalculus:-`*`(VectorCalculus:-`*`(I, omega), epsilon_0), VectorCalculus:-`-`(VectorCalculus:-`+`(diff(H[3], x), VectorCalculus:-`-`(diff(H[1], z))))):

E[3] := VectorCalculus:-`*`(1/VectorCalculus:-`*`(VectorCalculus:-`*`(I, omega), epsilon_0), VectorCalculus:-`+`(diff(H[2], x), VectorCalculus:-`-`(diff(H[1], y)))):

E:=Vector[column]([ E[1] ,
                 E[2] ,
                 E[3] ]):

E_plot:=fieldplot3d([E[1],E[2],E[3]], x=1..500,y=1..500,z=1..500,fieldstrength=log,arrows=SLIM):

 

 

subs(x=1,y=1,z=1,H):

 

H_plot;

 

 

 

E_plot;

 

 

``


 

Download short_dipole_matrix_way_old_school.mw 

 

First 25 26 27 28 29 30 31 Last Page 27 of 88