MaplePrimes Questions

Hello Friends

I have a critical problem that I wish to solve it with maple

suppose we have a list like following: y_obs=(2,4,8,7,9,52,35,478,52) and corresponding variance σy=(.2,.3,.5,.87,.1.2,.22,.78,.99,1.5)
we know y as the function of x described such as y_theoric=x+p and minimizing X is

X=Sigma [(y_theoric-y_obs)^2]/σy which includes the sum of nine numbers...

the question is:

How we can find p from likelihood function and plot general behavior of y versus of x through two above series?

for example this solution used in article under the names Hubble parameter data constraints on dark energy by Yun Chen and Bhatra Ratra (Physics Letters B)

Thank you


Hello everyone! I am currently solving on a basic coordinates points for my final year project. This is a part of my coding in maple.

ans := solve({eq5, eq6}, {P2, Q2});
             {P2 = 3.222860033, Q2 = 3.170614592}, 

               {P2 = 1.572224939, Q2 = 5.670614592}


I am finding the points of P2 and Q2. From there after solving for eq5 and 6 it will gives two points for P2 and two points for Q2. So how am i going to choose the points using maple coding without copy paste the answer?

Really appreciate if any of us can help me. Thank you in advanced :)


Consider for instance the following equation:


How can I list the coefficients of the exponential functions and also solve the equation for the constant parameters 

a, b, and c?

I tried 

[coeffs(collect(lhs(EQ), exp), exp)] =~ 0;

but it did not work. Thank you for your help.

I mean 

 plots:-implicitplot(sqrt(b)*sqrt(1-4*p/b)-2*arctan(sqrt((9*p/b-22201/10000)/(9/4-9*p/b))) = 0, b = 0 .. 5,
 p = 0 .. 5, gridrefine = 2, rational);

I find the above result unsatisfactory.

Hi, my problem is that I have a set of variables stored in a list, then when I try to sum with differentiation inside the sum, Maple immediately tries to differentiate before summing, thus returning zero.


So I define a list coords := [t, r, theta, varphi], then call sum(diff(r^2, coords[k]), k = 1 .. 4), however Maple does the differentiation first, so it becomes 0 instead of 8r.


I attached the maple worksheet with what I did, on the first line I define the list with variables, on the second line I show that maple evaluates diff(r^2, coords[k]) to zero before doing the sum, where k is what is being summed over, on the third line I show that it copes fine if a specific element of the list is called, on the fourth line I show that summation over elements of the list is fine, and the last two lines show an example of the kind of thing I would like to do


Is there a way to make this work?

Dear Maple Primes,

could you, please, help me with numeric integration? I’m new in numeric integration and can’t reach desired precision of a result.
Here is the integral f(xmax) that I try to compute for different values of xmax from the interval 0.025..0.24 :


where x0 is lower limit of outer integral, x0 := 0.025

and K, F and G are functions of x





a1:=8e3; a2:=6e4; a3:=3e4; a4:=1.8e8;
b1:=9.2e17; b2:=1.1e18; b3:=4.6e21;
c1:=8.202046; c2:=-12.31377; c3:=-818043.42;

Please, notice, that G (as well as G*F) is a steeply decreasing function on the interval x = 0.025..0.24.

I get "a seemingly correct" result (that means that f increases as xmax intreases), when I try to plot f(xmax) for the following "guessed" options


What is puzzling me is that I get a different "seemingly correct" result, when I modify the integral f by,
at fist, multiplying G by a constant (for example Const:=1e20; G:=Const*exp(c1+c2*x+c3*x7) )
and, second, plotting the f divided by this constant:


The following Figure presents the values of f plotted versus xmax with (red curve) and without (black curve) using of the constant Const:

Dear Primes, could you, please, comment on this difference? Because the only indicator that I have (from the analysis of G, F and K) is that f must be a monotonically (and stricktly) increasing function of xmax.

Please, find the maple worksheet in attachment.

Thank you in advance!

I want to find the maximize and minimize of the function
I tried 
minimize(f(x), x, location = 'true');
maximize(f(x), x, location = 'true');
But I didn't get the results.  How do I find the maximize and minimize of above funciton?


     I have a very large expression I'm tring to average (by doing limit(1/L*int(<expr>,t=-L..L),L=infinty) ). However, given that this expression is so large (sum of 11k terms), I'm was looking for ways to speed up the calculation and use less RAM.

     I found that applying the lim@int seperately to each term of the sum helps. Also, since my integrand has various functions of other variables (eg. f(x), g(y), etc), Maple seems to go faster if I freeze those functions using frontend.

     However, the problem I'm running into is that, as I'm running through my for-loop to apply lim@int to each term, Maple starts running slower and slower, as well as taking more and more RAM. Additionally, it doesn't go to completion because it runs out of stack space.

     Is there an optimization trick to avoid this problem? I've tried garbage collecting after each iteration; that helps the RAM problem (at a cost of speed), but it still slows down over time.

      I've attached my code: MWE.maple. Fair warning: on a non-server computer, it is liable to run very slow.

Is it possible to convert E1(x) to Ei(x) explicitly?

In particular I have this expression which is real, but imaginary numbers appear due to the definition of Ei1 for negative arguments.

(-exp(j*z)*Ei(1, j*z)+I*Pi*exp(-j*z)+exp(-j*z)*Ei(1, -j*z))/(2*j)




Thank you

In the application whose link is below, an error message results when I right click the fsolve command and select explore.

I would like to explore changes to several of the parameters in the equations named "sys", especially the value of Qoutflow. Can this be done and, If so, how can the solved values, Q1, Q2, Q3, and H be graphed as the slider values of individual parameters values are modified?

1) How can i get the event time. This example 0.69313.

2) I don't want to see the Warning.How can i do it? 


Warning, cannot evaluate the solution further right of .69314729, event #1 triggered a halt

how i can dsolve this equations and  convert the equations to an explicit first-order system ?

Also parameter 'p' is unknown and shoud be found.

Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system



with(PDEtools, casesplit, declare);L:=0.75e-4:

[casesplit, declare]


eq1:=0.2079268293e-3*(diff(psi(x), x, x))-101.2059621*(diff(u(x), x, x))-101.2059621*(diff(w(x), x))*(diff(w(x), x, x));
eq2:=0.2079248162e-3+29.57317072*psi(x)-29.57317072*(diff(w(x), x))-1.996189024*10^(-9)*(diff(psi(x), x, x))-1.996189024*10^(-9)*(diff(w(x), x, x, x));
eq3:=151.8089432*(diff(w(x), x))^2*(diff(w(x), x, x))+101.2059621*(diff(u(x), x, x))*(diff(w(x), x))+101.2059621*(diff(u(x), x))*(diff(w(x), x, x))-0.2079268293e-3*(diff(psi(x), x, x))*(diff(w(x), x))-0.2079268293e-3*(diff(w(x), x, x))*(diff(psi(x), x))+29.57317070*(diff(w(x), x, x))-29.57317072*(diff(psi(x), x))-1.996189024*10^(-9)*(diff(psi(x), x, x, x))-1.996189024*10^(-9)*(diff(w(x), x, x, x, x))-p*(diff(w(x), x, x));

0.2079268293e-3*(diff(diff(psi(x), x), x))-101.2059621*(diff(diff(u(x), x), x))-101.2059621*(diff(w(x), x))*(diff(diff(w(x), x), x))


0.2079248162e-3+29.57317072*psi(x)-29.57317072*(diff(w(x), x))-0.1996189024e-8*(diff(diff(psi(x), x), x))-0.1996189024e-8*(diff(diff(diff(w(x), x), x), x))


151.8089432*(diff(w(x), x))^2*(diff(diff(w(x), x), x))+101.2059621*(diff(diff(u(x), x), x))*(diff(w(x), x))+101.2059621*(diff(u(x), x))*(diff(diff(w(x), x), x))-0.2079268293e-3*(diff(diff(psi(x), x), x))*(diff(w(x), x))-0.2079268293e-3*(diff(diff(w(x), x), x))*(diff(psi(x), x))+29.57317070*(diff(diff(w(x), x), x))-29.57317072*(diff(psi(x), x))-0.1996189024e-8*(diff(diff(diff(psi(x), x), x), x))-0.1996189024e-8*(diff(diff(diff(diff(w(x), x), x), x), x))-p*(diff(diff(w(x), x), x))


dsys3 := {eq1, eq2, eq3, psi(0) = 0, psi(L) = 0, u(0) = 0, u(L) = 0, w(0) = 0, w(L) = 0, ((D@@1)(psi))(0) = 0, ((D@@1)(w))(0) = 0, ((D@@1)(w))(L) = 0}; dsol5 := dsolve(dsys3, 'maxmesh' = 1200, numeric, abserr = .1, output = array([L]))

Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system










The procedure F computes the smallest prime factor of  ithprime(n)-2

F := n -> ifactors((ithprime(n)-2))[2][1][1]:

Strangely, print(F)  must be interrupted!
Warning,  computation interrupted

F := n -> ifactors((ithprime(n)-2))[2][1][1];

Warning,  computation interrupted
Warning,  computation interrupted

(F is defined, only the display fails).
This happens only for interface(typesetting=extended).
In Maple 2017 it was OK.


how I can remove this error.

Error, numeric exception: division by zero


      I was trying to apply some assumptions to a pdsolve command and noticed a strange error. Here's a minimal working example.


pdsolve(diff(f(t,x),t) = 0, {f(t,x)}, ivars = {x, t}) assuming x::real:


Error, (in simpl/relopsum) invalid terms in sum: diff(f(t,x),t) = 0

Is this indeed a bug, or is it expected behavior?

First 534 535 536 537 538 539 540 Last Page 536 of 2154