Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi, 

I'm being unable to plot the solution to the equation

schro := {-(diff(psi(x), x, x))+(2*a*b*x^4+a^2*x^6+(b^2-a*(2*p+3))*x^2-(2*p+1)*b)*psi(x) = 0};

for the special cases of a=b=1 and p=0 and p=1

I've used dsolve and am getting Heun functions :-(

The claim is that the solutions come out to be exponentials of the form:

psi(x)=(x^p)*exp(-(a*(x^4))/4 - (b*(x^2))/2)

thanks in advance

I am trying to implement Subresultant p.r.s. algorithm for calculating greatest common divisor. The algorithm decribed in the book:

My code return the correct GCD, however the sub-resultant terms are different from the result of the built-in function. The last term a[i-1] is huge and involves fractions. I think my implementation is same as the algorithm described in the textbook.

I have attached the file. Could anybody spot anything wrong in the code? Why do fractions still appear? In my code, "lsr" is last subresultant term returned from the built-in function, the second one is my result.

with(RegularChains);

[Chain, ChangeOfOrder, Construct, Cut, DahanSchostTransform, Dimension, Empty, EqualSaturatedIdeals, EquiprojectableDecomposition, Extend, ExtendedNormalizedGcd, IsAlgebraic, IsEmptyChain, IsInRadical, IsInSaturate, IsIncluded, IsPrimitive, IsStronglyNormalized, IsZeroDimensional, IteratedResultant, LastSubresultant, Lift, ListConstruct, NormalizeRegularChain, NumberOfSolutions, Polynomial, Regularize, RemoveRedundantComponents, SeparateSolutions, Squarefree, SquarefreeFactorization, SubresultantChain, SubresultantOfIndex, Under, Upper]

(1)

A42vlastsub := proc (f, g) local i, a, dt, bt, om; i := 1; if degree(f) < degree(g) then a[0] := primpart(g, x); a[1] := primpart(f, x) else a[0] := primpart(f, x); a[1] := primpart(g, x) end if; dt[0] := degree(a[0])-degree(a[1]); bt[2] := (-1)^(dt[0]+1); om[2] := -1; while a[i] <> 0 do a[i+1] := normal(prem(a[i-1], a[i], x)/bt[i+1]); dt[i] := degree(a[i])-degree(a[i+1]); i := i+1; om[i+1] := (-lcoeff(a[i-1]))^dt[i-2]*om[i]^(1-dt[i-2]); bt[i+1] := -lcoeff(a[i-1])*om[i+1]^dt[i-1] end do; return a[i-1] end proc;

 

(2)

f := (y^2-1)*((y+1)*x^4+(y^2-1)*x^3+(y^3-1)*x^2+(y^4-1)*x+y^5-1);

(y-1)*x^5+(y^2-1)*x^4+(y^3-1)*x^3+(y^4-1)*x^2+(y^5-1)*x+y^6-1

(3)

R := RegularChains:-PolynomialRing([y, x]);

subresultant_chain

(4)

lsr := LastSubresultant(src, R);

y^25+y^24+2*y^23+4*y^22+8*y^21+16*y^20+46*y^19+160*y^18+402*y^17+808*y^16+1384*y^15+2080*y^14+2932*y^13+3762*y^12+4406*y^11+4740*y^10+4720*y^9+4400*y^8+3810*y^7+2968*y^6+2102*y^5+1360*y^4+800*y^3+400*y^2+139*y+21

(5)

``

mylastsr := A42vlastsub(primpart(f, x), primpart(g, x));

-(35867/3794275180128377091639574036764685364535950857523710002444946112771297432041422848)*y^9-(10309/7588550360256754183279148073529370729071901715047420004889892225542594864082845696)*y^8-(2889061/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^10-(94304133/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^13-(35600337/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^12-(11265153/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^11-(4325932673/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^21-(3534515779/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^20-(2703789263/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^19-(1929251163/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^18-(1277273509/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^17-(778538921/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^16-(432069123/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^15-(215109057/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^14-(5255652033/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^25-(5374732281/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^23-(5474736805/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^24-(4971065401/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^22-(475/3794275180128377091639574036764685364535950857523710002444946112771297432041422848)*y^7-(21/3794275180128377091639574036764685364535950857523710002444946112771297432041422848)*y^6-(332387607/30354201441027016733116592294117482916287606860189680019559568902170379456331382784)*y^32-(1/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^49-(23/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^48-(251/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^47-(1735/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^46-(8571/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^45-(32463/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^44-(99205/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^43-(255999/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^42-(586005/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^41-(1263605/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^40-(2747253/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^39-(6322305/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^38-(15325169/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^37-(37286331/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^36-(86630947/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^35-(186556683/60708402882054033466233184588234965832575213720379360039119137804340758912662765568)*y^34-(92016457/15177100720513508366558296147058741458143803430094840009779784451085189728165691392)*y^33-(275974877/15177100720513508366558296147058741458143803430094840009779784451085189728165691392)*y^31-(847698927/30354201441027016733116592294117482916287606860189680019559568902170379456331382784)*y^30-(1210953247/30354201441027016733116592294117482916287606860189680019559568902170379456331382784)*y^29-(1616246617/30354201441027016733116592294117482916287606860189680019559568902170379456331382784)*y^28-(505494959/7588550360256754183279148073529370729071901715047420004889892225542594864082845696)*y^27-(2376326883/30354201441027016733116592294117482916287606860189680019559568902170379456331382784)*y^26

(6)

``


 

Download subresultant.mw

I am having difficulty to solve the following ODE

ode:=diff(R(x),x$6)=Dirac(x-y);

with initial and boundary conditions

bcs := ((D@@3)(R))(1) = 0, R(0)-((D@@5)(R))(0) = 0, ((D@@2)(R))(0)-((D@@3)(R))(0) = 0, ((D@@5)(R))(1) = 0, (D(R))(0)+((D@@4)(R))(0) = 0, ((D@@4)(R))(1) = 0;

I want to solve the above ODE for two cases 1) x>y and 2) x<=y

Thanks

 

Let us consider 

MmaTranslator:-FromMma(" Table[0,{n=10},{m=2}]");

[seq([seq(0,i=1..(m := 2))],j=1..(n := 10))]

The above result is syntactically incorrect in Maple language. The translation should be 

Matrix(10,2)
#or
[seq([seq(0,i=1.. 2)],j=1..10)]

up to the Mmma's result

Table[0, {n = 10}, {m = 2}]

{{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0,0}, {0, 0}}

Another bug is as follows.

MmaTranslator:-FromMma("Sinc[x]");

Sinc(x)

whereas the expected result is piecewise(x=0,1,sin(x)/x) up to http://reference.wolfram.com/language/ref/Sinc.html

In general, the MmaTranslator package is outdated. It often returns working Mma's commands as incorrect (Concrete examples are long and need a context. These may be exposed on demand.). The question arises about the quality of other Maple translations. 

Hello,

I want plot this equations with values independents x,A,B

But this is error.

Any idea?

Thanks

I resolved the coefficients to a 2nd order diff eq of the form:ay''+by'+cy=f(t)

I have included the .mw file for convenience at the link at the bottom of the page.  I resolved the coefficients in 2 different ways & they do not concur.  The 1st approach used the LaPlace transform & partial fraction decomposition.  The coefficient results are given by equations # 14 & 15.  The 2nd approach used undetermined coefficients where I assumed the particular solution and then applied the initial conditions to resolve the coefficients pertaining to the homogeneous solution which are given in the results listed in equation #23.  Noted in the 1st case the coeff's are A3 & A4 and for the 2nd approach the coeff's are A1 & A2.  I have worked this numerous times & do not understand why they do not concur.  So I thought I should get some fresh eyes on the problem to find where I may have gone wrong.

Any new perspective will be greatly apprecieated.

I had trouble uploading the .mw file so I have included an alternative link to retrieve the file if the code contents is illegible or you cannot dowlad the file drectly from the weblink  Download coeffs_of_homogen_soln_discrepancy.mw.  You should be able to download from the alternative link below once you paste the link into your browser.  If you cannot & wish for me to provide the file in some other fashion respond with some specific instructions & I will attempt to get the file to you.

https://unl.box.com/s/dywe90wwpy0t4ilkuxshkivz2z26mud8

Thanks 4 any help you can provide.

Download coeffs_of_homogen_soln_discrepancy.mw

I need to implement gaussian elimination with cross multiply. I followed the method decribed in the textbook, however the result returned a wrong determinant. I noticed that cross multiplication changes the determinant in every step. Does anybody know how to use the cross multiplication without altering the determinant?

 

 

Find the first 6 non-zero terms of MacLaurin series of the function erf(x)

Consider the expression infinityn=1 (-1)n ebeta*n/n2

 

1. Find the symbolic value of this sum.

2. Find an approximation for the value when beta= -2.

3. Build a function to calculate an approximation for the value of the given expression for

any value for beta

 

Hi all, first poster just getting to grips with Maple here. I am having some problems with the 'verify' function in Maple - I can't understand why it is returning 'FAIL' An example of my printout is given below. 

 

> verify( 2*q/(q^4+q^2+1)-1/((q-1)^2*(q+1)), 0, 'greater_equal') assuming q>7;

                                             true

 

> verify( (2*q+1)/(q^4+q^2+1)-1/((q-1)^2*(q+1)), 0, 'greater_equal') assuming q>7;

                                             FAIL

 

Now it's th second line i'm interested in and it was only after trial and error that i found the first option worked. The fact the 1st does but 2nd doesn't makes no sense to me. Perhaps it's something stupid i'm missing - any help would be great. Thanks.

Dear all,

I'm investigating the vibration performance of timber beams. I have sample data from my test which shows the vibration of the beam. I want to determine the eigenfrequency from this data. The problem I face is that I'm not finding the probber eigenfrequency. I have two data rows; time and amplitude. I'm able to plot the amplitude with SignalPlot but not the time, therefore I have to adjust the samplerate. I have the same problem with the fourier analysis. Is it possible to include the time period as well?

Regards,

 

Maurits

 

Hello,

I need a bimodal distribution. Since I could not find any among the ones provided by Maple, I created a simple one:

with(Statistics):
U := Distribution(PDF = (proc (t) options operator, arrow; piecewise(t < -5, 0, t < 5, -(1/2000)*t^4+(9/1000)*t^2+7/80, 0) end proc)):
X := RandomVariable(U):

#Plotting PDF and CDF works fine:
plot(PDF(X, t), t = -infinity .. infinity);

plot(CDF(X, t), t = -infinity .. infinity)

However, plotting the quantile function does not work:

plot(Quantile(X, z), z = 0 .. 1);

it has a decreasing part for z<1/2 and a discontinuity at z=1/2.
I can plot it correctly as
plot('Quantile'(X, z), z = 0 .. 1);

but I wonder why the first option does not work for such a simple distribution.

 

 

I have a trouble of Maple.
I can't understand the solution of Maple for simplification of Dirac and Heaviside functions.

I wrote the below code,

"restart:
simplify(Dirac(x)*f(x))".

Then, Maple return the answer of this code, "Dirac(x)*f(0)".
I could understand this solution, then I rewrote the next code,

"restart:
_EnvUseHeavisideAsUnitStep:=true:
Heaviside(0)"

Then, Maple returned "1", because I set the value of Heaviside's step function H(x) at x=0.
Finally, I wrote the below code, but there was a problem, I think.

"restart:
_EnvUseHeavisideAsUnitStep:=true:
simplify(Dirac(x)*Heaviside(x))"

The solution of Maple was "0".

According to my first code, I think this solution is Dirac(x)*Heaviside(0), that is, Dirac(x).
I can't understand this result.
Someone help me, please.

 

The command

plots:-implicitplot(evalc(argument((1+x+I*y)/(1-x-I*y))) <= (1/4)*Pi, x = -5 .. 5, y = -5 .. 5, crossingrefine = 1, gridrefine = 2, rational = true, filled, signchange = true, resolution = 1000);

produces an incorrect result

in view of

evalf(argument((1-4+4*I)/(1+4-4*I)));
                          2.889038378

There is a workaround 

plots:-inequal(evalc(argument((1+x+I*y)/(1-x-I*y))) <= (1/4)*Pi, x = -5 .. 5, y = -5 .. 5);

 

Dear all,

I need to transforme these equation from time domain to frequency domain with fourier transforms and solve it in frequency domain but i received the flowing error

any helps

thank you !

 

``

restart:with(inttrans):

E:=1;L:=1;

1

 

1

(1)

 

equ := arccos(y(t)/R)*R*L*(diff(y(t), `$`(t, 1)))*abs(diff(y(t), `$`(t, 1)))+diff(y(t), `$`(t, 2))+m*sin(omega*t+k*R*sin(`&theta;l`))+arccos(y(t)/R);

arccos(y(t)/R)*R*(diff(y(t), t))*abs(diff(y(t), t))+diff(diff(y(t), t), t)+m*sin(omega*t+k*R*sin(`&theta;l`))+arccos(y(t)/R)

(2)

eq:=fourier(equ,t,omega);

((1/2)*I)*m*fourier(exp(-I*omega*t), t, omega)*exp(-(1/2)*k*R*exp(I*`&theta;l`)+(1/2)*k*R*exp(-I*`&theta;l`))-omega^2*fourier(y(t), t, omega)-((1/2)*I)*m*fourier(exp(I*omega*t), t, omega)*exp((1/2)*k*R*exp(I*`&theta;l`)-(1/2)*k*R*exp(-I*`&theta;l`))+R*fourier(arccos(y(t)/R)*(diff(y(t), t))*abs(diff(y(t), t)), t, omega)+fourier(arccos(y(t)/R), t, omega)

(3)

csi := y(0) = 0.2e-1, (D(y))(0) = 0;

y(0) = 0.2e-1, (D(y))(0) = 0

(4)

sol := dsolve({csi, eq}, numeric, maxfun = 1000000000)

Warning, The use of global variables in numerical ODE problems is deprecated, and will be removed in a future release. Use the 'parameters' argument instead (see ?dsolve,numeric,parameters)

 

Error, (in solve) cannot solve expressions with fourier(arccos(Y[1]/R)*YP[1]*abs(YP[1]), t, omega) for YP[1]

 

Code :

Download Fourier_TRAns_MAPLEprime.mwFourier_TRAns_MAPLEprime.mw

First 1025 1026 1027 1028 1029 1030 1031 Last Page 1027 of 2216