MaplePrimes Questions

So, basically i plan to define procedures based on if conditions that will assume arbitarily large float approximations as being infinity, as with the example i have uploaded, but i feel that i need some people from here that are smarter than me to tell me why this is going to be terrible or what i need to consider. 

I am willing to consider my current view naive and or inept, however i feel as if computer algebra systems will eventually develop means of reducing the need for floating point results by making concise implicit steps of manipulation on floating point computations, naturally i feel as if these routines are evidence that maybe some of the maple programmers have such an objective, but i do tend to misinterpret everything all the time.

 


 

convert(evalf[100](1/RootOf(floor(_Z))), 'rational', 'exact')

infinity

(1)

``


 

Download primes_Question_Algebra.mw

Please may I know if you can offer ma student's discount ob the seleted version.

Thank you.

Fred.

How can I apply differential transformation method in differential equations with maple commands .DE is y'''(x)+xy''(x)-y(x)=0;

I solve a boundary value problem for a linear system of first order PDEs
in the unknowns u(x, t) and "v(x,t)."  Ultimately, I am interested in the graph
of the function v(0, t) but numerical artifacts distort that graph badly by
imposing spurious oscillation.

Is there a way to maneuver the calculations to obtain the graph of v(0, t)
without the oscillation?

restart;

pde1 := diff(u(x,t),t)=diff(v(x,t),x);

diff(u(x, t), t) = diff(v(x, t), x)

pde2 := diff(u(x,t),x)=v(x,t);

diff(u(x, t), x) = v(x, t)

ibc := u(x,0)=1, u(0,t)=0, u(1,t)=0;

u(x, 0) = 1, u(0, t) = 0, u(1, t) = 0

dsol := pdsolve({pde1,pde2}, {ibc}, numeric, spacestep=0.01, timestep=0.01);

_m139872446597344

dsol:-value(output=listprocedure):
my_u := eval(u(x,t), %):
my_v := eval(v(x,t), %%):

plot3d(my_u(x,t), x=0..1, t=0..0.5);

plot3d(my_v(x,t), x=0..1, t=0..0.5);

The oscillations are numerical artifacts.  Can they be avoided?

plot(my_v(0,t), t=0..0.5);

A side comment: By eliminating vbetween the two PDEs we see that u
satisfies the standard heat equation, thus vis the flux.  The expression
v(0, t) expresses the heat flux at the boundary, and that's what I am after.
 


 

Download calculating-flux-in-the-heat-equation.mw

I open a completely new document, type in a few simple expressions and get this weird complex number out. Can someone pleas help me fix this?

In this question at here https://tex.stackexchange.com/questions/503745/how-can-i-get-correct-the-point-a-and-b-automatically-in-this-picture/503838?noredirect=1#comment1272706_503838
The points A and B lie on the circle is intersection of the sphere x^2 + y^2 + (z-3)^2 = 25 and the plane z = 0. 
How can I find coordinates of the points A and B by Maple?

 

searchtext and SearchText do not work well with non-ASCII characters.
Strangely, StringTools:-Search is OK.

restart;
m:=convert([77,97,116,104,195,169,109,97,116,105,113,117,101], bytes);
                      m := "Mathématique"
seq(searchtext(m[i..7], m), i=1..7);
                      1, 0, 0, 4, 0, 0, 1
seq(SearchText(m[i..7], m), i=1..7);
                      1, 0, 0, 4, 0, 0, 7
seq(StringTools:-Search(m[i..7], m), i=1..7);
                      1, 2, 3, 4, 5, 6, 7

 

I'm a Maple novice.  I have two questions.  (1) I'm trying to use Maple to confirm some Fourier transforms of selected probability density functions.  In general I've succeeded, but Maple fails to find the Fourier transform of the pdf of a logistic random variable with mean 0.  Please explain how I can get Maple to carry out this request.  I've attached a Maple file with my work to this question.  (2) At several points in my computations, I wish to substitute 2*Pi*xi for omega.  I have an expression containing two omegas.  If I use algsubs(), only one of the two omegas is replaced.  I have to use subs() to replace both omegas.  Why is this?
 

Use Maple to confirm selected Fourier transform of logistic random variable

with(inttrans)

[addtable, fourier, fouriercos, fouriersin, hankel, hilbert, invfourier, invhilbert, invlaplace, invmellin, laplace, mellin, savetable]

(1)

assume(a > 0)

NULL

"f(x):=((e)^(x/(a)))/(a*(1+(e)^(x/(a)))^(2))"

proc (x) options operator, arrow, function_assign; exp(x/a)/(a*(1+exp(x/a))^2) end proc

(2)

int(f(x), x = -infinity .. infinity)

1

(3)

fourier(f(x), x, omega)

fourier(exp(x/a)/(1+exp(x/a))^2, x, omega)/a

(4)

"f(x) := 1/(4*a*(cosh(x/(2*a)))^(2))"

proc (x) options operator, arrow, function_assign; (1/4)/(a*cosh((1/2)*x/a)^2) end proc

(5)

int(f(x), x = -infinity .. infinity)

1

(6)

fourier(f(x), x, omega)

fourier(1/(exp((1/2)*x/a)+exp(-(1/2)*x/a))^2, x, omega)/a

(7)

Wikipedia's article on "Logistic distribution" gives a characteristic function that implies that the Fourier transform of this pdf should equal Pi*a*omega/sinh(Pi*a*omega).

Unit rectangular function

rect := proc (x) options operator, arrow; Heaviside(x+1/2)-Heaviside(x-1/2) end proc

proc (x) options operator, arrow; Heaviside(x+1/2)-Heaviside(x-1/2) end proc

(8)

fourier(rect(a*x), x, omega)

2*sin((1/2)*omega/a)/omega

(9)

algsubs(omega = 2*Pi*xi, 2*sin((1/2)*omega/a)/omega)

2*sin(Pi*xi/a)/omega

(10)

subs(omega = 2*Pi*xi, 2*sin(Pi*xi/a)/omega)

sin(Pi*xi/a)/(Pi*xi)

(11)

``

NULL


 

Download Logistic_pdf.mw

 

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);

How can find order of convergence  for multiple roots for example x-2*f(x)/Df(x)

WHICH have quadratic  order of convergence how find out in maple software????

 

How do I calculate the intersection curve between a plane and a drop?
The "drop" is defined in the following way:

R1 := 3.;R2 := 1.0;DR := 4;g := R2 + DR;

f1 := h -> sqrt(R1^2 - h^2);
f2 := h -> sqrt(g^2 - h^2);
f3 := h -> (1 - h/g)*f1(h*R1/g) + h*f2(h)/g;
f4 := h -> sqrt(1/2*g - 1/2*h);
f5 := h -> (1 - h/g)*f3(h) + h*f4(h)/g;
gg := h -> piecewise(h < 0, f1(h), 0 <= h, f5(h));#Radius depending on the z-position h
cir := (h, phi, R) -> <sin(phi)*R, cos(phi)*R, h>; # a circle at the hight h with radius R
#The plane is placed inside the drop.
n := (x, y, z) -> <x, y, z>/sqrt(x^2 + y^2 + z^2);

# the following lines show, how it looks like:
with(plots);
with(plottools);
dro1 := plot3d(cir(h, phi, gg(h)), h = -R1 .. g, phi = 0 .. 2*Pi, scaling = constrained, orientation = [-60, 72, 0]);
plotDropWithPlane := (x, y, z) -> display(dro1, arrow(Vector([0, 0, 0]), 2*R1*n(x, y, z), 0.2, 0.4, 0.1, cylindrical_arrow, fringe = blue, color = "Green"), implicitplot3d(x*x1 + y*y1 + z*z1 = 0, x1 = -R1 .. R1, y1 = -R1 .. R1, z1 = -R1 .. g, color = blue));
plotDropWithPlane(3, 1, 2);

#I'm searching a function like
fintersect:=theta-><"?,?,?>"

Any idea how to solve?

Best regards,

Andreas

unprotect(D); f := proc (x, y) options operator, arrow; (295849/5841396)*x^2-(29441/324522)*y*x+(33995/216348)*y^2-(5989/14751)*x+(3635/4917)*y+1 end proc; 295849 2 29441 33995 2 5989 f := (x, y) -> ------- x - ------ y x + ------ y - ----- x 5841396 324522 216348 14751 3635 + ---- y + 1 4917 coeffs(f(x, y)); -5989 3635 295849 33995 -29441 1, -----, ----, -------, ------, ------ 14751 4917 5841396 216348 324522 A, B, C, D, E, F := %; -5989 295849 33995 -29441 3635 A, B, C, D, E, F := 1, -----, -------, ------, ------, ---- 14751 5841396 216348 324522 4917

Is there any way we can get maple to tell us which variable we are recursively assigning? 

I would like to simplify

sin(4*pi*w)/sin(2*pi*w) 

The answer I am looking for is 2*cos(2*pi*w).

Does anyone have an idea how to do this is Maple? Some earlier version of Maple I used could do this, 

simplify( sin(4*pi*w)/sin(2*pi*w) ) =  2*cos(2*pi*w)

There a plenty of different trigonometric representations for the answer, so my hypothesis is that I should somehow tell to Maple which I am looking for. 

For example

Gives

Which is better, but still not the answer I am looking for

Best Regards,

P

 

 

 

First 454 455 456 457 458 459 460 Last Page 456 of 2234