Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Is there a way to verify the following Fourier transform property: F[f(x) exp(x)](k) = F[f(x)](k − b)? This is what I tried:
 

restart

with(inttrans)

constants := constants, b

false, gamma, infinity, true, Catalan, FAIL, Pi, b

(1)

left := fourier(f(x)*exp(I*b*x), x, k)/sqrt(2*Pi)

(1/2)*2^(1/2)*fourier(f(x)*exp(I*b*x), x, k)/Pi^(1/2)

(2)

right := fourier(f(x), x, k-b)/sqrt(2*Pi)

(1/2)*2^(1/2)*fourier(f(x), x, k-b)/Pi^(1/2)

(3)

simplify(left-right)

(1/2)*2^(1/2)*(fourier(f(x)*exp(I*b*x), x, k)-fourier(f(x), x, k-b))/Pi^(1/2)

(4)

NULL


 

Download First_Shifting_Theorem.mw

Is there a way to specify options or something to change the definition of fourier and invfourier to have a 1/sqrt(2Pi) factor instead? I don't want to manually multiply the result by 1/sqrt(2Pi) every time in case I forget to do it and it leads to a mistake in the future.

Dear all,

Please I want only 8 points to show on this curve, how do I specify it?

plot(ln(1+sin(Pi*x)), x = 0 .. 1, legend = numerical, style = point, symbol = box, color = blue, symbolsize = 15, numpoints = 8);

Thank you all and kind regards.

Please do keep safe amidst this global pandemic.

I would appreciate to know how to compute the following in Maple:

Sequence of distinct primes (starting term is 2) such that each subsequent term is the smallest prime not yet seen whose leading digits and the sum of the digits of the previous term are the same. It starts: 2,23,5,53,83,11,29..
 

it should be interesting to see which primes with first digit 3 appear (given that 3 is not a term). I would also like to be able to change the first term (eg to 3).

Best regards

David.

Found in old studymaterial about Loka-volterra ode 

dsolve({D(N)(t)=r*N(t)-k*N(t)^2,N(0)=N[0]},N(t));

Seems to me not logical notation to use a D operator  : D(N)(t)  for this ode : makes it unneeded complicated this notation..or do i miss something?

Please can you help me in resolving this error?

Here is the codeOptimal_control_model_of_DF_and_LP_2.mw

Hi all, I have a linear equations 31 variables, I want to solve for m[i] >=0. Someone can help me, thank you very much.

L := {m[4]+4*m[7]+m[10]+m[13]+m[16]+m[19]+m[22] = 2*sqrt(2)+7, m[15]+3*m[18]+11*m[21]+m[6]+9*m[12]+2*m[3]-2*sqrt(2)*m[18]+6*sqrt(2)*m[21]-4*sqrt(2)*m[12]+m[24] = 2*sqrt(2)+61, -4*sqrt(2)*m[14]+6*m[14]+m[17]+11*m[20]+m[2]+4*m[5]+18*m[8]+6*sqrt(2)*m[20]-8*sqrt(2)*m[8]+m[23] = 2*sqrt(2)+34, m[27]-2*sqrt(2)*m[19]+4*sqrt(2)*m[7]+2*sqrt(2)*m[13]-2*m[16]+m[17]-6*m[19]-4*m[4]+m[5]+m[20]-16*m[7]+4*m[8]+m[11]-4*m[13]+m[14] = 6*sqrt(2)-6, m[28]+2*sqrt(2)*m[19]-4*sqrt(2)*m[10]-2*sqrt(2)*m[16]+m[15]+2*m[16]+m[18]+2*m[4]+m[6]+6*m[19]+m[21]+4*m[9]+2*m[10]+m[12]-2*m[13] = 6*sqrt(2)+21, m[25]+6*sqrt(2)*m[19]-2*sqrt(2)*m[20]-8*sqrt(2)*m[7]+4*sqrt(2)*m[8]-4*sqrt(2)*m[13]+2*sqrt(2)*m[14]+6*m[13]-4*m[14]+m[16]-2*m[17]+m[1]+4*m[4]+11*m[19]-6*m[20]-4*m[5]+18*m[7]-16*m[8] = 6*sqrt(2)-33, m[26]+6*sqrt(2)*m[19]+2*sqrt(2)*m[21]-4*sqrt(2)*m[10]-4*sqrt(2)*m[12]-2*sqrt(2)*m[16]-2*sqrt(2)*m[18]+m[13]-2*m[15]+3*m[16]+2*m[18]+2*m[1]+11*m[19]+6*m[21]+m[4]+2*m[6]+9*m[10]+2*m[12] = 6*sqrt(2)-33, m[29]+2*sqrt(2)*m[18]+6*sqrt(2)*m[20]-12*sqrt(2)*m[21]-2*sqrt(2)*m[3]-4*sqrt(2)*m[11]-2*sqrt(2)*m[15]-2*sqrt(2)*m[17]+m[14]+4*m[15]+3*m[17]-2*m[18]+2*m[2]+11*m[20]-22*m[21]+m[5]-4*m[6]+9*m[11] = 6*sqrt(2)-6, m[30]-12*sqrt(2)*m[20]+6*sqrt(2)*m[21]-2*sqrt(2)*m[2]-8*sqrt(2)*m[9]-2*sqrt(2)*m[14]-4*sqrt(2)*m[15]+2*sqrt(2)*m[17]+4*m[14]+6*m[15]-2*m[17]+m[18]+m[3]-22*m[20]+11*m[21]-4*m[5]+4*m[6]+18*m[9] = 6*sqrt(2)+21, -4*m[4]+2*m[5]+2*m[17]-2*m[18]-22*m[19]+6*m[20]-6*m[21]-2*m[16]-4*m[15]+m[31]-4*m[6]-16*m[9]+2*m[11]+4*m[13]-2*m[14]-2*sqrt(2)*m[1]+4*sqrt(2)*m[9]-2*sqrt(2)*m[17]-4*sqrt(2)*m[11]+2*sqrt(2)*m[15]+2*sqrt(2)*m[16]-12*sqrt(2)*m[19]-2*sqrt(2)*m[13]+2*sqrt(2)*m[20]-2*sqrt(2)*m[21] = 12*sqrt(2)-120}

In reference to the nice application: https://www.mapleprimes.com/posts/209845-Dataframes--Looking-For-A-New-Flashlight by @Christopher2222 ,  my question is: 

is there a simple way to sort primarily by one column, but if two elements possess identical values, then using a second column to determine the order? For example, what if we wanted to sort the flashlight dataframe primarily by "B-type" but use a subsort by "Minutes". 

I wrote a function which used recursion. It worked fine for small dataframes, but was painfully slow with a multi-thousand element spreadsheet.

 

Hello,

I have a nonhomogeneous heat conduction problem, where the thermal conductivity, the density, and the specific heat of the
material are piecewise functions.

The thermal conductivity derivative has a discontinuity that causes a problem in the pdsolve command (see the first test).

To avoid this problem, I did a second test where the product rule was calculated directly.

Is there a better way to deal with this problem?

thank you

problem.mw

Dear Maple community,

I am trying to import from a .csv (or .xls) a matrix, whose symbolic elements have subscripts of a type "a[1, 2, 3, 4]" (i.e., datatype=indexed). However, when I enter "ImportMatrix(csvFile, datatype = indexed)", I receive an error message "Error, (in ImportMatrix) unable to store '0' when datatype=indexed". I would highly appreciate your help with importing an indexed matrix. Thank you.

Are there any established (or not established but cool) methods to exchange data between different worksheets or workbooks?

Actually there are 2 questions.

  1. If I have 2 different worksheets or workbooks open in Maple, and want to exchange data between them.
  2. One workbook, but different worksheets in the same workbook.

I am currently working on a project that generates a set of matrices and I want to find their eigenvalues, but using the inbuilt Maple engine takes too long. The problem is that whenever I try to use the Matlab[eig] command I get the error:

Error, (in Matlab:-setvar) unable to store '-3.*Re(X)' when datatype=float[8]
I found out that solving symbolic matrices in MATLAB requires first defining symbols with the "sym" command but I've been unable to do that in Maple.

why   print(lastexception);  gives `[Length of output exceeds limit of 1000000]` while just doing lastexception; gives no problem?

 

restart;
eq:=x*y*p = y^2+x*(4*x^2+y^2)^(1/2);
try
   sol:= timelimit(20,`assuming`([solve(eq,y)],[real]));
catch:
   print(lastexception);
end try;
lastexception

I know one should use something like

print(StringTools:-FormatMessage( lastexception ))

But I do not know why print(lastexception) gives the length exceeds error. 

whattype(lastexception) gives exprseq

 

Maple 2020.1

 

Hi, 

Could anyone help me to numerically solve this ode?
I've tried almost all the methods Maple proposes, trying to adjust stepsizes, tolerances and so on;, always without success.

I give also the exact solution of this ode in order to compare the numerical solution to.

Thanks in advance
 

restart

interface(version)

`Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895`

(1)

with(plots):

# Source term

F := t*(-600*t/(100*t^2+1)^2+80000*t^3/(100*t^2+1)^3)/(100*t^2+1)-(1/(100*t^2+1)-200*t^2/(100*t^2+1)^2)/(1+(1/(100*t^2+1)-200*t^2/(100*t^2+1)^2)^2);

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

t*(-600*t/(100*t^2+1)^2+80000*t^3/(100*t^2+1)^3)/(100*t^2+1)-(1/(100*t^2+1)-200*t^2/(100*t^2+1)^2)/(1+(1/(100*t^2+1)-200*t^2/(100*t^2+1)^2)^2)

 

 

# Ode

ode := X(t)*diff(X(t), t$2)-diff(X(t),t)/(1+diff(X(t),t)^2) - 'F'

X(t)*(diff(diff(X(t), t), t))-(diff(X(t), t))/(1+(diff(X(t), t))^2)-F

(2)

# Initial conditions

ics := X(0) = 0, D(X)(0) = 1

X(0) = 0, (D(X))(0) = 1

(3)

# I used alot methods with allways either failure or either a HFloat(undefined)

printf("rkf45\n");
sol := dsolve({ode, ics}, numeric):
sol(1e-8);

printf("\n\nrosenbrock\n");
sol := dsolve({ode, ics}, numeric, method=rosenbrock):
sol(1e-8);

printf("\n\ngear\n");
sol := dsolve({ode, ics}, numeric, method=gear):
sol(1e-8);

printf("\n\ngear\n");
sol := dsolve({ode, ics}, numeric, method=classical[heunform]):
sol(1e-8);

rkf45

Error, (in sol) cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up

 



rosenbrock

Error, (in dsolve/numeric/SC/firststep) unable to evaluate the partial derivatives of f(x,y) for stiff solution

 

Error, (in sol) cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up

 



gear

 

[t = 0.1e-7, X(t) = HFloat(HFloat(undefined)), diff(X(t), t) = HFloat(HFloat(undefined))]

 



gear

 

[t = 0.1e-7, X(t) = HFloat(HFloat(undefined)), diff(X(t), t) = HFloat(HFloat(undefined))]

(4)

# The solution must be this one

U := t -> t/((t*10)^2+1)

proc (t) options operator, arrow; t/(100*t^2+1) end proc

(5)

# Check ode and ics

eval(ode, X(t)=U(t));
U(0);
D(U)(0);

0

 

0

 

1

(6)

# Plots when a solution is obtained

display(
  plot(U(t), t=0..1, color=blue),
  odeplot(sol, [t, x(t)], t=0..1, color=red, linestyle=3)
);


 

Download Unsuccessful_dsolve.mw

 

xE.mw

I integrate the expression maple but the result is large. How to furtherxE.mw reduce the size of the result? Also, what is dilog on maple?

First 386 387 388 389 390 391 392 Last Page 388 of 2097