MaplePrimes Questions

Here is the minimal working example: 

with(Physics):
Setup(noncommutativeprefix={W,V});
simplify(W^(-1)*(-W^(-1)-W*V^(-2)));

 

It gives the result  below, which is wrong. Or am I misinterpreting? (Maple 2018)

 

(-V^2-W^2)*(1/V^2)*(1/W^2)

how i can solve a system of integral equations? thanks for the help.
 

restart; with(LinearAlgebra); with(VectorCalculus)

pin1 := 1858.; pout1 := 0; pin2 := 0.1858e5; pout2 := 0; S := 1; T := 10; Fa1 := 0.; Fa2 := 0.
``

T[rr] := -pin-C10*simplify(int(B^2*sqrt((r^2-A)/B)^(2+m)/r^3-r/sqrt((r^2-A)/B)^(2-m), r = s .. t))/S^m-C20*simplify(int(r/(B^2*sqrt((r^2-A)/B)^(2-n))-sqrt((r^2-A)/B)^(2+n)/r^3, r = s .. t))/S^n

eq1 := C10*simplify(int((-2*A*r^2+A^2)/(r^3*sqrt((r^2-A)/B)^(2-m)), r = s .. t))/S^m+C20*simplify(int((2*A*r^2-A^2)/(B^2*r^3*sqrt((r^2-A)/B)^(2-n)), r = s .. t))/S^n

eq2 := 2*Pi*simplify(int(T[rr]*r, r = s .. t))-2*Pi*C10*simplify(int((B^4*sqrt((r^2-A)/B)^(2+m)-r^2*sqrt((r^2-A)/B)^m)/(B^2*r), r = s .. t))/S^m-2*Pi*C20*simplify(int((-B^3*r^3+A*B^3*r+r^3)/(B^2*sqrt((r^2-A)/B)^(2-n)), r = s .. t))/S^n

A := 0.50456255261718905958813087648305534133592085046840e-2; B := 1.0000045465297826882965065372650452712135679772907; S := 1; T := 10; Eq1 := simplify(subs([t = sqrt(B*T^2+A), s = sqrt(B*S^2+A)], eq1)); Eq2 := simplify(subs([pin = 1858., t = sqrt(B*T^2+A), s = sqrt(B*S^2+A)], eq2))

6.283156738*(int(0.5045671411e-2*C10*r*(int((2.*r^2-0.5045625526e-2)*(.9999954530*r^2-0.5045602584e-2)^((1/2)*m)/(r^3*(r^2-0.5045625526e-2)), r = 1.002521906 .. 10.00027501))-0.5045625526e-2*C20*r*(int((2.*r^2-0.5045625526e-2)*(.9999954530*r^2-0.5045602584e-2)^((1/2)*n)/((r^2-0.5045625526e-2)*r^3), r = 1.002521906 .. 10.00027501))-1858.008448*r, r = 1.002521906 .. 10.00027501))-6.283128170*C10*(int((.9999954530*r^2-0.5045602584e-2)^((1/2)*m)*(0.13641e-4*r^2-0.5045694353e-2)/r, r = 1.002521906 .. 10.00027501))+6.283156738*C20*(int((0.1364100000e-4*r^3-0.5045694353e-2*r)*(.9999954530*r^2-0.5045602584e-2)^((1/2)*n)/(r^2-0.5045625526e-2), r = 1.002521906 .. 10.00027501))

(1)

``

Eq3 := simplify(subs([t = sqrt(B*T^2+A), s = sqrt(B*S^2+A)], eq1)); Eq4 := simplify(subs([pin = 0.1858e5, t = sqrt(B*T^2+A), s = sqrt(B*S^2+A)], eq2))

6.283156738*(int(0.5045671411e-2*C10*r*(int((2.*r^2-0.5045625526e-2)*(.9999954530*r^2-0.5045602584e-2)^((1/2)*m)/(r^3*(r^2-0.5045625526e-2)), r = 1.002521906 .. 10.00027501))-0.5045625526e-2*C20*r*(int((2.*r^2-0.5045625526e-2)*(.9999954530*r^2-0.5045602584e-2)^((1/2)*n)/((r^2-0.5045625526e-2)*r^3), r = 1.002521906 .. 10.00027501))-18580.08448*r, r = 1.002521906 .. 10.00027501))-6.283128170*C10*(int((.9999954530*r^2-0.5045602584e-2)^((1/2)*m)*(0.13641e-4*r^2-0.5045694353e-2)/r, r = 1.002521906 .. 10.00027501))+6.283156738*C20*(int((0.1364100000e-4*r^3-0.5045694353e-2*r)*(.9999954530*r^2-0.5045602584e-2)^((1/2)*n)/(r^2-0.5045625526e-2), r = 1.002521906 .. 10.00027501))

(2)

  ``

NULL

ANS := fsolve({Eq1 = pout1-pin1, Eq2 = Fa1, Eq3 = pout2-pin2, Eq4 = Fa2}, {C10, C20, m, n})

``

NULL

NULL


 

Download fsolve.mw

Hello,

I have a procedure, SoS that returns the value for sos. After compiling the procedure, I get float(undefined) for the return value. How can this be fixed?

 

Thanks so much for your time.

 


 

restart; kernelopts(version); interface(version)

`Standard Worksheet Interface, Maple 2019.2, Windows 10, November 26 2019 Build ID 1435526`

(1)

NULL``

Erealm := Array([1235.773, 1383.61, 1457.262, 1500.264, 1550.184, 1612.161, 512.7612, 656.6554, 743.6461, 793.375, 855.7937, 939.1199, 79.9523, 128.1375, 167.1459, 193.592, 230.5401, 287.8348, 22.389, 29.41424, 35.91883, 40.86366, 48.79128, 63.4475, 15.34275, 17.10101, 18.63288, 19.77424, 21.5671, 24.84739, 13.8321, 14.52843, 15.07626, 15.47014, 16.07713, 17.16574, 13.13383, 13.63704, 13.95888, 14.16849, 14.46123, 14.93971, 12.76736, 13.2203, 13.50072, 13.673, 13.89852, 14.23242], datatype = float[8]); LFm := Array([.156795, .1248161, .1108722, .1032334, 0.9474591e-1, 0.8496174e-1, .361361, .3020133, .2706018, .2546556, .2356126, .2121333, .6883826, .6532309, .6155578, .5906291, .5578895, .5123917, .394458, .5326358, .6095816, .6489291, .6894866, .7232845, .1456468, .2226473, .2826954, .3228541, .3789496, .4632182, 0.6758032e-1, 0.9437384e-1, .1198126, .1387971, .1680719, .2181531, 0.5173809e-1, 0.586771e-1, 0.6591736e-1, 0.7206892e-1, 0.8243504e-1, .1024519, 0.457877e-1, 0.493836e-1, 0.5191291e-1, 0.539114e-1, 0.5708074e-1, 0.6330242e-1], datatype = float[8]); maxx := ArrayNumElems(LFm); E0 := 13.; E00 := 4200.; alpha := .5; beta := 0.7e-1
NULL

``

SoS := proc (E0::float, E00::float, alpha::float, beta::float, maxx::integer, Erealm::(Array(datatype = float[8])), LFm::(Array(datatype = float[8])))::float; local k, omegatau, Ecomplex, Erealc, Eimagc, LFc, sos; sos := 0.; for k to maxx do Ecomplex := Complex(Erealm[k], Erealm[k]*LFm[k]); omegatau := abs(-I*(((E0-E00)/(Ecomplex-E00))^(1/beta)-1)^(1/alpha)); Erealc := Re(E00+(E0-E00)/(1+(I*omegatau)^alpha)^beta); Eimagc := Im(E00+(E0-E00)/(1+(I*omegatau)^alpha)^beta); LFc := Eimagc/Erealc; sos := sos+(log10(Erealm[k])-log10(Erealc))^2+(LFm[k]-LFc)^2 end do; return sos end proc

``

``

SoS(E0, E00, alpha, beta, maxx, Erealm, LFm)

HFloat(0.015392438292813794)

(2)

cSoS := Compiler:-Compile(SoS); cSoS(E0, E00, alpha, beta, maxx, Erealm, LFm)

Float(undefined)

(3)

``

``


 

Download Compile_proc.mw

 

Hey, to all!

First post here and after searching the web for answers I thought I'll ask it here.

haven't used Maple for a long time so I'm quite new in it.

I've solved a PDE in a numeric and in a analytic way and I want to the find the difference between the results.

I've come up with this:

1.2.mw

Had few tries with a few commands but for no success.

I seem to be able to find the specific value of the analytical solution but not the numeric one although it is solved.

Also I can't subtract to find the difference.

I will appreciate help in any kind,

Thank you!

 

I'm not sure if it's possible to find a formula with predictive qualities, but I thought I'd ask anyway ...

IOD.mw

         I'd like to draw a graph with its  vertices  of 3d style.  Just like following image:

  

  I did not find the desired choices for this graph.

Hello All,

I have an autonomous system of ordinary nonlinear equations. In order to investigate it near the fixed points, I would like to reduce it to the normal or hyper-normal form. I see in the literature that some authors developed unique algorithms for the very specific differential systems (e.g., the systems with two/three eigenvalues), which is not my case.  

Maybe you know, if Maple has any specific commands that may conduct such type of reduction?

Thanks in advance,

Dmitry

 

 

Hi,

I’m trying to animate the volume generated by rotating the function curve around the Ox axis. the Solidofrevolution command with animation output generate a disk volume

Thanks

QuestionAnimationVolumeOfRevolution.mw

I am solving coupled PDEs under various BCs and ICs on the (x,t) domain, to obtain momentum p((x(t),t) solution plots of the within a MAPLE worksheet. 

However, I am getting JAVA memory overload (> 2GB), which brings MAPLE to a halt when plots are displayed in the worksheet.  Is there a way of writing the graphical plots directly to a file on my computer, so that the plots can later be view separately on my computer screen, thus avoiding JAVA memory overload within MAPLE.

If this is possible, please could someone send me MAPLE code to create external plots...perhaps using simple examples in MAPLE?

Melvin .

with(DEtools); with(plots); with(plots, implicitplot);

LC := [diff(x(t), t) = x(t)*(1-x(t)^2-y(t)^2)+y(t)*((1-x(t))^2+y(t)^2), diff(y(t), t) = y(t)*(1-x(t)^2-y(t)^2)-y(t)*((1-x(t))^2+y(t)^2)]

p1 := DEplot(LC, {x(t), y(t)}, t = 0 .. 100, [x(0) = 1, y(0) = 1])

Error, (in DEtools/DEplot/CheckInitial) too few initial conditions: [x(0) = 1]

Download mm.mwmm.mw

Hello,

I am trying to generate a compiled c function

dc_test := proc( a :: Array(datatype=float[8]), b :: Array(datatype=float[8]), c :: Array(datatype=float[8]) ) 

c[..,..] := a . b;

return 0

end:

cdc_test:=Compiler:-Compile(dc_test, optimize):

a := Array(1..2, 1..2, fill=1.0, datatype=float[8]);
b := Array(1..2, 1..2, fill=1.0, datatype=float[8]);
c := Array(1..2, 1..2, datatype=float[8]);
                           
dc_test(a, b, c);

cdc_test(a, b, c);

This doesn't work because it doesn't recognize the "." symbol. Also if I were to take the transpose, for example Transpose(a), then it doesn't recognize that either. Are there commands for this that I'm unware of or do you have to program them from scratch?

Hi,

How to animate a plot with Shadebetween command?

Thanks

AnimationShadebetween.mw

Hi, I am currently working with Maple on school, and I wanted to use the diff(); function to find the partial derivative with respect to x. Anyways; I noticed when I was not using the multiplication sign I got the answer 0 as seen below:

diff(2*sqrt(xyz), x) = 0

But when I used the multiplication sign as seen (x*y*z instead), I got the correct answer.

diff(2*sqrt(x*y*z), x) = y*z/sqrt(x*y*z)

Why so?

 

Thanks,

Adrian

hi daer 

i am trying to run the following but error came 

acually the boundry conditions are periodic

x=linspace(0,1,50);
t=linspace(0,1,50);
m=0;
eqn=@(x,t,u,dudx)transistorPDE(x,t,u,dudx,C);
ic=@(x)transistorIC(x,C);
sol=pdepe((m,eqn,ic,transistorBC,x,t);
function [c,f,s]=transistorPDE(x,t,u,dudx,C)
a=0.1;
c=1;
f=0;
s=-a*dudx;
end
function u0=transistorIC(x,C)
L=1;
u0=exp(-(x-L/2)^2);
end
function [pl,ql,pr,qr]=transistorBC(xl,ul,xr,ur,t)
pl=ul;
ql=0;
pr=pl;
qr=0;
end
 

Hello Everyone

I have solved the equation below numerically and now I want to integral p(x)

ode := diff((b+5)*((1/6)*(diff(p(x), x))*h^3+(1/2)*c*h^2)/(b+2)+De^2*((1/10)*(diff(p(x), x))^3*h^5+c^2*(diff(p(x), x))*h^3+(1/2)*c*(diff(p(x), x))^2*h^4+c^3*h^2)/(b+2), x)+diff(h, x) = 0

ics := p(0) = 0, p(1) = 0;
                   ics := p(0) = 0, p(1) = 0
solnum := dsolve({ics, ode}, numeric, method = bvp, maxmesh = 600);
                solnum := proc(x_bvp)  ...  end;
odeplot(solnum, 0 .. 1)

but when I write evalf(int(p,0..1)) I get this result:int(p,0..1). What should I do to have the value?

First 601 602 603 604 605 606 607 Last Page 603 of 2434