MaplePrimes Questions

Hi

Im going to solve mixing layer boundary layer equation in maple but Its this error: "Error, (in Shoot:-shoot) invalid boundary conditions, must be given at one point"

please help me. thank you.

> restart;
> alias(U = u(x, y), V = v(x, y)); PDE := {diff(U, x)+diff(V, y) = 0, U*(diff(U, x))+V*(diff(U, y))-nu*(diff(U, `$`(y, 2))) = 0};
print(`output redirected...`); # input placeholder
    // d   \   / d   \        / d   \     / d   \      / d  / d   \\    \ 
   { |--- U| + |--- V| = 0, U |--- U| + V |--- U| - nu |--- |--- U|| = 0 }
    \\ dx  /   \ dy  /        \ dx  /     \ dy  /      \ dy \ dy  //    / 
> simsubs := eta(x, y) = y*sqrt((1/2)*u[0]/(nu*x));
print(`output redirected...`); # input placeholder
                                                  (1/2)
                                 1    (1/2) /u[0]\     
                     eta(x, y) = - y 2      |----|     
                                 2          \nu x/     
> stream := psi(x, y) = sqrt(2*nu*x*u[0])*f(eta(x, y));
print(`output redirected...`); # input placeholder
                           (1/2)            (1/2)             
              psi(x, y) = 2      (nu x u[0])      f(eta(x, y))
> Usubs := U = diff(rhs(stream), y);
print(`output redirected...`); # input placeholder
              (1/2)            (1/2)                 / d           \
         U = 2      (nu x u[0])      D(f)(eta(x, y)) |--- eta(x, y)|
                                                     \ dy          /
> Vsubs := V = -(diff(rhs(stream), x));
print(`output redirected...`); # input placeholder
               (1/2)                     
              2      f(eta(x, y)) nu u[0]
        V = - ---------------------------
                               (1/2)     
                  2 (nu x u[0])          

              (1/2)            (1/2)                 / d           \
           - 2      (nu x u[0])      D(f)(eta(x, y)) |--- eta(x, y)|
                                                     \ dx          /
> ODE := simplify(subs(Usubs, Vsubs, simsubs, PDE));
print(`output redirected...`); # input placeholder
 /                             /      /           /                 (1/2)\  /    
 |                  1          |    2 |           |1    (1/2) /u[0]\     |  |1   
 |0 = 0, - ------------------- |u[0]  |@@(D, 2)(f)|- y 2      |----|     | f|- y 
<                        (1/2) \      \           \2          \nu x/     /  \2   
 |               2 /u[0]\                                                        
 |         2 nu x  |----|                                                        
 \                 \nu x/                                                        

               (1/2)\          (1/2)  
   (1/2) /u[0]\     |    /u[0]\       
  2      |----|     | nu |----|      x
         \nu x/     /    \nu x/       

                                 /                 (1/2)\\\    \ 
                (1/2)            |1    (1/2) /u[0]\     |||    | 
   + (nu x u[0])      @@(D, 3)(f)|- y 2      |----|     ||| = 0| 
                                 \2          \nu x/     ///     >
                                                               | 
                                                               | 
                                                               / 
> simsubs2 := solve(subs(eta(x, y) = eta, simsubs), {y});
print(`output redirected...`); # input placeholder
                              /         (1/2) \ 
                              |    eta 2      | 
                              |y = -----------| 
                             <           (1/2) >
                              |    /u[0]\     | 
                              |    |----|     | 
                              \    \nu x/     / 
> ODE := simplify(subs(simsubs2, ODE), symbolic);
print(`output redirected...`); # input placeholder
      /             2                                                 \ 
      |         u[0]  (@@(D, 2)(f)(eta) f(eta) + @@(D, 3)(f)(eta))    | 
     < 0 = 0, - -------------------------------------------------- = 0 >
      |                                2 x                            | 
      \                                                               / 

> shootlib := "C:\\Users/abbas/Desktop/maple9/"; libname := shootlib, libname; with(Shoot);
print(`output redirected...`); # input placeholder
                                   [shoot]
> FNS := {f(eta), g(eta), h(eta)};
> ODE := {diff(f(eta), eta) = g(eta), diff(g(eta), eta) = h(eta), diff(h(eta), eta) = -f(eta)*h(eta)};
print(`output redirected...`); # input placeholder
 /  d                      d                      d                          \ 
{ ----- f(eta) = g(eta), ----- g(eta) = h(eta), ----- h(eta) = -f(eta) h(eta) }
 \ deta                   deta                   deta                        / 
> IC := {f(0) = 0, g(0) = 0, h(0) = beta};
print(`output redirected...`); # input placeholder
                      {f(0) = 0, g(0) = 0, h(0) = beta}
> BC := {g(-10.) = 0, g(10.) = 1, limit(eta-f(eta), eta = 10) = 0};
print(`output redirected...`); # input placeholder
                  {10 - f(10) = 0, g(-10.) = 0, g(10.) = 1}
> infolevel[shoot] := 1;
print(`output redirected...`); # input placeholder
                                      1
> S := shoot(ODE, IC, BC, FNS, beta = 0, abserr = 0.5e-6, output = listprocedure, method = taylorseries);
%;
Error, (in Shoot:-shoot) invalid boundary conditions, must be given at one point
 

Hi 

how can i solve this integral in term of x

int(d*e^(-b*x)/(((a*e^(-2*b*x)+c*e^(-4*x)))))

Need help solving this problem with a maple proc using the Crank–Nicolson method for the differential part and any other quadrature  for the integral part and thank you so much in advance any ideas or thoughts would be helpful

hello everyone,

please I need our help to find the eigenvalues (m) of this equation (eq)

thank you 

eq.mw
 

``

restart

with(LinearAlgebra):

NULL

Digits := 5:

``

``

eq := exp(-m*xi)*(exp((1/4)*sqrt(-m)*r*(r-1))*(1+(7/20)*sqrt(m)*r+((49/800)*m-(1/4)*sqrt(m))*r^2)*r^I+exp((1/4)*sqrt(-m)*r*(r-1))*(1+(7/20)*sqrt(m)*r+((49/800)*m-(1/4)*sqrt(m))*r^2)*r^I*cos(theta)+r^I*sin(5*theta))

exp(-m*xi)*(exp((1/4)*(-m)^(1/2)*r*(r-1))*(1+(7/20)*m^(1/2)*r+((49/800)*m-(1/4)*m^(1/2))*r^2)*r^I+exp((1/4)*(-m)^(1/2)*r*(r-1))*(1+(7/20)*m^(1/2)*r+((49/800)*m-(1/4)*m^(1/2))*r^2)*r^I*cos(theta)+r^I*sin(5*theta))

(1)

``


 

Download eq.mw

 

I just used Maple for the first time to find the roots of an equation, the problem they give me imaginary solutions every time I put a (ln); even for ln (1) it proposes me -265.745524189222 + 0.785398163397448 * I as a solution. Could you help me to solve this problem?

Could you help me converting this old version code to modern version code(Maple 2017)?
 

restart

N := 2; A := -N; B := N

q := .3; p := .5; sa := .9; sb := .1; r := 1-p-q

dimP := 2*N+1

P := Matrix(dimP, dimP)

P[1, 1] := sa; P[1, 2] := 1-sa; P[dimP, dimP] := sb; P[dimP, dimP-1] := 1-sb

for i from 2 to dimP-1 do P[i, i-1] := q; P[i, i] := r; P[i, i+1] := p end do

P

Matrix(%id = 18446745940352174910)

(1)

# change this part code to the modernversion with(linalg)

J := diag(`$`(1, dimP))

d := matrix(dimP, 1, [`$`(1, dimP)])

b := matrix(dimP+1, 1, [`$`(0, dimP), 1])

A := transpose(augment(P-J, d))

linsolve(A, b)

linsolve(transpose(augment(Matrix(%id = 18446745940387027294), d)), b)

(2)

``


 

Download mdernVersion.mw

how can i define this  operation of diff in matrix

 

 

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 

 

I am trying to find all real solutions of the system equations 
sol := solve(And(g'(x)=0,g''(x)<>0),x)   assuming real;
I tried

restart; fprime := x-> x^6-(3/2)*x^5+2*x^4+(5/2)*x^3-7*x^2+2:
f := unapply(simplify(int(fprime(x), x)), x):
g := unapply(expand(f(x^2+2*x)), x):
sol := solve(And(g'(x)=0,g''(x)<>0),x)   assuming real;
evalf(sol);

I don't get only real solutions. How can I get only real solutions?


 

restart

with(Statistics)

seq(sum((binomial(2*k, k)/4^k)^d, k = 1 .. infinity), d = [3, 4, 5, 6])

MeijerG([[1], [2, 2, 2]], [[3/2, 3/2, 3/2, 1], []], -1)/Pi^(3/2), MeijerG([[1], [2, 2, 2, 2]], [[3/2, 3/2, 3/2, 3/2, 1], []], -1)/Pi^2, MeijerG([[1], [2, 2, 2, 2, 2]], [[3/2, 3/2, 3/2, 3/2, 3/2, 1], []], -1)/Pi^(5/2), MeijerG([[1], [2, 2, 2, 2, 2, 2]], [[3/2, 3/2, 3/2, 3/2, 3/2, 3/2, 1], []], -1)/Pi^3

(1)

``

``


 

Download sum(binomial_with_higer_dim).mw

 The result does not seem to terminate whem I use evalf([%]).  The result should be like this:

(1/8)hypergeom([1,3/2,3/2,3/2],[2,2,2],1), (1/16)hypergeom([1,3/2,3/2,3/2,3/2],[2,2,2,2],1),(1/32)hypergeom([1,3/2,3/2,3/2,3/2,3/2],[2,2,2,2,2],1), (1/64)hypergeom([1,3/2,3/2,3/2,3/2,3/2,3/2],[2,2,2,2,2,2],1)

Thanks in advance.

 

 

I called an external function for Gauss elimination written in C in Linux. I successfully compiled and used following command in maple worksheet.

mygauss:=define_external('main',LIB="/home/user/Desktop/gauss.so"):

it gave the following output

 

cannot dynamically load executable

###############

The C code is attached gauss1.txt.

 

 gauss1.txt

 

Hello. Found on this forum a program that rolls a cube. Is it possible to supplement the program with notation for vertices (A,B,C,D,A',B',C',D') and so that they move with the cube? Thanks!

cuberoll_(1).mw

i want to draw a truss with graph theory 

n__a := Vector[row](10, [-35., -13., -19., 38., -47., -31., 81., 46., -80., -58.]), Vector[row](10, [36., 76., -74., -63., 87., -88., 25., 9., -92., -94.]), Vector[row](10, [71., 5., 83., 1., -99., 64., 65., 50., -29., -7.]), Vector[row](10, [75., -2., 95., -25., 77., -62., 98., -43., 96., 12.]), Vector[row](10, [47., 5., 25., -95., 8., 4., 51., -67., 89., -53.]), Vector[row](10, [-15., 92., -69., -77., -33., 69., 11., 19., -55., 21.]), Vector[row](10, [-48., 74., 27., -49., 49., -63., 51., 29., -67., -25.]), Vector[row](10, [-38., -24., 16., -24., -63., -87., 95., -12., 77., 40.]), Vector[row](10, [-80., -28., 83., -66., -25., -34., -11., 96., -70., 97.]), Vector[row](10, [48., -63., 81., -28., -1., 64., 34., 93., 13., 43.])

im trying to convert each vector in this list into a set making a list of sets. Also if you know a way to make a list of lists that might be useful

First 669 670 671 672 673 674 675 Last Page 671 of 2425