Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

How to read and write video file in maple?

i want to read one video file and then manipulate this to another file and then play two files to compare in maple

if maple 12 can not , which version can do?

I am trying to get jacobian computed for lorenz equations, not showing matrix, using Maple 2019 newest version. any guidance?

 

 

 

 

Dear all

I have a set composed by vectors C(K), S(K) i would like to show that this set of vectors is orthogonal

That is, we pick any two different vectors and I compute the usual inner product and I verify if the result is zero or no

many thinks for your help  

 

 

orthogonal.mw

 

 

 

 

 

DE:=f'''(x)+f''(x)(cos(alpha)x+sin(alpha)f(x))/2=0;

ics:=f(0)=0,f'(0)=1,f'(x)=0 for x tends to infinity;

How to solve this DE im RK methods?

HI

Hot on the heels of my previous question https://www.mapleprimes.com/questions/227935-Multiply-Contents-Of-Vector-To-Get-Expected-Value#answer262336

I have attempted to maximize growth while keeping variance below a fixed level (with not much success), but 

can any of you maximize the growth of a 3 stock portfolio while minimizing the variance.

Efficient_Frontier.mw

How do I draw three graphs on the same axis of coordinates and I see this graph appear after the previous graph one second with the Maple command? Example : y = x, y = x2, y = 1 - x.

Thanks so much for the help of everyone!

Hi everybody!

 

Quick question for you guys. I have access to Maple 2019 on my main computer and Maple 2018 on a remote Desktop (but I don't want to use because it's super slow and bad (normal rdp stuff)). The problem I have is for the same document, same line, same instruction, Maple 2019 on my computer is failling to do it correctly (unable to do the matrix correctly) and in the Remote Maple 2018 it's doing it just fine. I really don't understand. If someone can give me a little help it would be highly apreciated!

 

Maple 2018 (what it's supposed to do):

 

Maple 2019 (what it is not suppose to do):

Hi

I am doing a differential equation problem and decided to add units. However, when using dsolve i get the error:

"Error, (in dsolve) the units `s` and `1` have incompatible dimensions"
 

Can some of you experts see where i am wrong? 


 

restart

with(Units[Standard])

assume(t >= 0*Unit('s'))

``

Acceleration := diff(h(t), t, t) = g-b*(diff(h(t), t))/mass

diff(diff(h(t), t), t) = g-b*(diff(h(t), t))/mass

(1)

``

``

``

``

Source: https://adventure.howstuffworks.com/skydiving1.htm

b := piecewise(`and`(t >= 0, t < T), b__1, `and`(t >= T, t < infinity), 7*b__1)

piecewise(t < T, b__1, T <= t, 7*b__1)

(2)

T := 60*Unit('s')

60*Units:-Unit(s)

(3)

mass := 80*Unit('kg')

80*Units:-Unit(kg)

(4)

b__1 := 13*Unit('kg'/'s')

13*Units:-Unit(kg/s)

(5)

g := -9.81*Unit('m'/'s'^2)

-9.81*Units:-Unit(m/s^2)

(6)

``

IC := h(0) = 4000, (D(h))(0) = 0

h(0) = 4000, (D(h))(0) = 0

(7)

solution := dsolve({IC, Acceleration}, h(t))

Error, (in dsolve) the units `s` and `1` have incompatible dimensions

 

H := eval(h(t), solution)

Error, invalid input: eval received solution, which is not valid for its 2nd argument, eqns

 

fsolve(H = 0, t, 0 .. infinity)

Error, (in fsolve) H is in the equation, and is not solved for

 

plot(H, t = 0 .. 150, y = 0 .. 4100, axis[2] = [gridlines = 30], axis[1] = [gridlines = 20], labels = ["t [s]", "h(t) [m]"], labelfont = ["Times", 15], color = "red", size = [1000, 1000])

Warning, expecting only range variable t in expression H to be plotted but found name H

 

 

``

``


 

Download Problem_1_test.mw

I am pretty certain that the problem here is simple, but only in the sense that what is counter intuitive to me is intuitive to most.
The final line as i have indicated ought to be a sequence of 1's, which should be evident upon inspection  of the code within the "for loop". But as you can see, it always has an additional count which is going to be an issue if I elaborate on this basis to further investigate. 

Can someone please explain to me why this occurs? I intented for a boolean as can be seen, only two outcomes, either the tally represented by the variable TRUE is incremented by 1, or the tally represented by the variable FALSE is incremented by 1.

I'm hoping it is sleep deprivation and it is simply because  I am not paying attention, but it's hard to tell if I am or am not, i know it's very funny yes i am a strange breed of crazy

Help appreciated in advance.

 


 

restart

``

 

delta := proc (x, y) options operator, arrow; piecewise(x = y, 1, x <> y, 0) end proc

``

``

Identity1 := proc (alpha, beta, eta, lambda, n, N) options operator, arrow; sum((delta(n, k)-(eta+I*lambda)*delta(n, k+1))*floor((alpha+I*beta)*(eta+I*lambda)^(k-N)), k = 1 .. N) = floor((alpha+I*beta)*(eta+I*lambda)^(n-N))-(eta+I*lambda)*floor((alpha+I*beta)*(eta+I*lambda)^(n-N-1))-delta(n, N+1)*(alpha+I*beta)*(eta+I*lambda) end proc:

``

``

R := {}:

Card := 0:

while Card < 10 do TOTAL := 1000; TRUE := 0; FALSE := 0; for w from 0 to TOTAL do A := (rand(-100 .. 100))()/(rand(1 .. 100))(); B := (rand(-100 .. 100))()/(rand(1 .. 100))(); C := (rand(-100 .. 100))()/(rand(1 .. 100))(); F := (rand(-100 .. 100))()/(rand(1 .. 100))(); N := 100; if is(Identity1(A, B, C, F, w, N)) = true then TRUE := TRUE+1 else FALSE := FALSE+1 end if end do; result := [TRUE/TOTAL, FALSE/TOTAL]; R := `union`(R, {result}); Card := Card+1 end do:

{[71/500, 859/1000]}

(1)

R

{[3/20, 851/1000], [7/50, 861/1000], [29/200, 107/125], [69/500, 863/1000], [141/1000, 43/50], [147/1000, 427/500], [149/1000, 213/250]}

(2)

seq(R[k][1]+R[k][2], k = 1 .. nops(R))

1001/1000, 1001/1000, 1001/1000, 1001/1000, 1001/1000, 1001/1000, 1001/1000

(3)

NULL


 

Download MAPLE_Q_29_09_2019.mw

restart;

with(DifferentialGeometry);
with(Tensor);

DGsetup([x, t], M1);

g := evalDG((dt &t dt) - t^2*(dx &t dx))
Geodesics()

 

I created a two dimensional cross-section of a spacetime described by this metric above. 

I would like to plot the geodesics in polar coordinates using the time t as the radius (normalized to our current time equal to unity).

That is, I would like to plot the geodesics starting at x=0, t=1 (x=0 maps to the top of the polar plot). X is the polar angle.

This plot is likely to map to this figure. Never mind the details of wiggles, or titles, etc.  I am new to maple and could use an initial push.

How to create a double underscore in a macbook air.  

I type G__[], the underscore disappears even on 1-D math.  I am using maple 2019.1, Mojave 10.14.6

I am trying to follow an example on geodesics 

 

with(Physics);

Setup(mathematicalnotation = true);
Setup(coordinates = X);

g_[];

 

I cannot reproduce the example because I cannot even create the syntax.

 

 

Take any odd number k, with distinct odd prime divisors p_1,...p_k and ask the following question: What is the smallest even number which when added to each prime divisor p_i of k, gives another prime? Example: k= 119=7*17, so the smallest even number is 6 because 7+6=11 and 17+6=23. NB: some numbers (eg 105,195,231...) seem to have no solution. I would appreciate assistance with a code to calculate for every odd k, the even number in question, or to allocate 0 for numbers where no solution has been found up to some suitably convincing high number like N= 10^5 or 10^6, (a parameter I could change if desired). The idea would be to conjecture that the apparently no solution numbers (up to N) don’t actually have a solution. Any assistance much appreciated in advance. I have found the solutions up to k=781 by hand, but my hand is getting tired now.

cheers,

David.

ps: I would like to have the option (if possible) to output the numbers with solution =  0, and the numbers which are the smallest to have solution 2*n, as separate sequences, for n up to some arbitrary value (ie 3,7,23,69,93...). (n>=1). Hope this is not asking too much. 

How i convert the following mathematica code to Maple

f1[t^m_] := Gamma [m + 1] t^(m - a[t]) /Gamma[m + 1 + a[t]];
f1[t] := Gamma [2] t^(1 - a[t]) /Gamma[2 + a[t]];

f1[p_Plus] := Map[f1, p]
f1[c_*f_] := c*f1[f] /; FreeQ[c, t]
f1[c_] := 0 /; FreeQ[c, t]

f1[x^2*t^2 + t + x]

gives

t^(1 - a[t])/Gamma[2 + a[t]] + (2 t^(2 - a[t]) x^2)/Gamma[3 + a[t]]

First 631 632 633 634 635 636 637 Last Page 633 of 2218