MaplePrimes Questions

Hi!
which Maple command gives the exact value of factorial (1/2)?   ``(1/2)!``

Thanks.

This is a minor issue, but I noticed using Maple 2019, with Physics cloud version 331 that it prints on the screen some results from internal computation on some calls to pdsolve

I have a ":" at the end of each command, so no output should go to the screen. In Maple 2018 this does not happen.

 

pde := a*diff(w(x,y),x) +  b*arctan(lambda*y)*diff(w(x,y),y) =  a*arctan(mu*x)^m+arctan(beta*y)^k:
sol := pdsolve(pde,w(x,y)):

#another example

pde := a*diff(w(x,y),x) +  b*arccot(lambda*y)*diff(w(x,y),y) =  a*arccot(mu*x)^m+arccot(beta*y)^k:
sol:=pdsolve(pde,w(x,y)):

Running the above on Maple 2019 and Maple 2018, here is screen shot. Notice the output in Maple 2019

 

In Maple 2019

 


Hello everyone! 

I have the following Maple code: 

with(CurveFitting); with(plottools); with(Statistics); A := [[1.364, 0.64765768e-1], [2.05, -.182176113], [2.664, -0.13914542e-1], [2.728, 0.2193938e-1], [4.092, -0.18349139e-1], [4.1, -.312968801], [5.328, -0.1819837e-2], [5.456, -.28840961], [6.15, -.57076866], [7.992, .175022254]];
F := LeastSquares(A, x);
plot([F, A], x = 0 .. 8, legend = ["Метод наименьших квадратов", "Экспериментальные данные"], legendstyle = [font = ["Roman", 15]], labels = ["d, ìì", "ln(I/I_0)"], labelfont = ["Roman", 15], labeldirections = ["horizontal", "vertical"], axesfont = ["ROMAN", "ROMAN", 15], color = [red, blue], style = [line, point], linestyle = [solid], symbolsize = 20, title = "Определение линейного коэффициента поглощения", titlefont = [Roman, bold, 20]);

This produces a plot:

How can I add error bars to the points that are colored in blue?

Thank you in advance for any help!

Having problems with solving PDE with symbolic BCs. 

u(x,y,t,M,A); 

 M,A,x are constants for this problem. 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Code Starts

pde := diff(u(x, y, t), t)-.5*(diff(u(x, y, t), y, y))-A*sin(M*x-t) = 0

bc[1] := u(x, 0, t) = 0

bc[2] := u(x, 10, t) = A*sin(M*x-t)

sys := [pde, bc[1], bc[2]]

pdsolve(sys)

>>>>>>>>>>>>>>>>Code ends

I don't get any solution after this.
Moreover, in the second BC, I would like to change 10 to inifnity. 

Thank you in advance for your help. 

-(-u*(diff(v, x))+int((diff(v, x))*(diff(u, x)), x)+int((diff(v, x, x))*u, x))  how to simplify this expression to zero by any commands?

Error, module member referencing is not supported in evalhf

 

What is the solution for this error. 

Also when I run job in command prompt I also getting following errors

Warning, the restart command only works at the top level. It cannot be executed within a procedure, or from a file being read by the read statement. 

But the same code runs fine in GUI.

 

 

Hello everybody and thankyou in advance to answer my question.

I am trying to answer this question:

“Find the solutions for x so that the sine of x degrees be equal to the sine of x radians in the interval [0, Pi].” I wrote this formula to solve it but without success:

solve(sin(x*degree)=sin(x),x) assuming 0<=x<=Pi

I expected a solution like:

{x=0, x=(180*Pi)/(180+Pi)} but not,

I somehow get a numeric solution for the first positive real number within the referred interval with this:

fsolve(sin(x*Pi/180) = sin(x), x, 0 .. Pi);

But if I change the interval for example [0, 3*Pi] I still only get one answer, not the four I spect.

 

Hi, 

I am struggling with statistical analysis of a dataset. I would appreciate help from the community. Let me describe what I am looking for.

1. The linear regression model that I am trying to use is Y=b1X1 + b2x2 + e. I am interested in estimating b1 and b2 so that the estimated error is the least.

2. I am trying to randomly select 25 percent of observations from the dataset and estimate b1 and b2. 

3. The estimated coefficients are used to predict the Y values for the remainder of the 75 percent of the data and calculate the error. The idea is to use a subset to estimate coefficients, and check for the robustness of the estimates.

4. The process is iterated for say 100 times.

5. Each time, I would like to store the statistical results and export them to an excel file.

For some reason, each time I struggle with one or two steps mentioned above. Could anyone help me with the approach?

Thank you,

Omkar

 

I have a circle equation: F: = x^2+y^2 = 1.
I need to check: x^2+y^2 <= 1.
I tried to get this expression from F like this: lhs(F) <= rhs (F).
The content matches what I need but get: Error, cannot determine if this expression is true or false: x^2+y^2 <= 1.
When I specify just the if x^2+y^2 <= 1 then everything works fine. What am I doing wrong?

New to maple here. Having this problem for evaluating my function. If its relevant it is to solve the Ising model analytically. Whats the problem and how do I fix it? Thanks.

Hi all

We denote the collecction of sets determined by the first k coin tosses $F_k$

Suppose the imitial stock price is $S_0$ ,with up and down facter being $u$ and $d$.

Up : S1(H)=u S0 and S1(T)=d S0

S_{N+1}= alpha S_N

where alpha =u or d

Let the probability of each $H$ and $T$ be $p$ and $q=1-p$ and   $F_t$ the sigma-lgebra generated by the coin tosses up to (and inchudling) time t:

After three coin tosses.

Can we propose a code computing the element of the filtration F1 and F3 and sigma(S3) (the sigma algebra generated by S3).

For example by hand we have F1={ emptyset, Omega, AH, AT}

Where AH={ w: w1=H}

AT={w: w1=T}

Can we compute

 

$E[ S_2|F_3] \text { and } E[ S_2|\sigma(S_3) ] $

 

$$E[ \frac{S_2}{S_1} | F_1] \text { and } E[ \frac{S_2}{S_1} | \sigma(S_1) ] $$

 

 

restart;
with(Finance);
S := [7.9, 7.5, 7.1, 6.5, 5., 3.7, 3.3, 2.95, 2.8];
         [7.9, 7.5, 7.1, 6.5, 5., 3.7, 3.3, 2.95, 2.8]
T := BinomialTree(3, S, .3);
TreePlot(T, thickness = 2, axes = BOXED, gridlines = true);

 

 

many thanks

Hi! For a process control exercise I'm trying to obtain the coefficients of different powers of the variable to design a PID controller. I have obtained the following equation :

Gc := (s^2*t^2+2*s*t*x+1)*(-b*s+1)/(k(-b*s+1)*s(tc+b))

 

I want to simplify it into an equation of the following form :

Gc = a( 1 + 1/(b*s) + c*s )

where a, b and c would be determined by Maple from the previous equation. I've tried using simplify() expand(simplify()) in different ways from the documentation and other threads, but to no avail. Any help would be greatly appreciated!

 

Thanks a lot!

Antoine.

Hello all,

I'm trying to do kinetic modeling of sequential dissociations with DE. I'm hitting a snag when modeling the third dissociation. The population should start at zero at t=0, but some of my model functions are non-zero at t=0. Is there anyway to fix this to force the funtions to go through zero?

Scheme:
PPPP -> intermediates -> PPP -> intermediates -> PP -> intermediates -> P  
(where P is a subunit and intermediates are confirmational changes before dissociation of a subunit)

a'..d' is the first dissociation
e' is the second dissociation
f'..l' is the third dissociation
Fits are evaluated by the residual sum of squares.

sol := dsolve([a' = -k1*a(x), b' = k1*a(x)-k1*b(x), c' = k1*b(x)-k1*c(x), d' = k1*c(x)-k1*d(x),
e' = k1*d(x)-k2*e(x), 
f' = k2*e(x)-k3*f(x), g' = k3*f(x)-k3*g(x), h' = k3*g(x)-k3*h(x), i' = k3*h(x)-k3*i(x), j' = k3*i(x)-k3*j(x), k' = k3*j(x)-k3*k(x), l' = k3*k(x)-k3*l(x), 
a(0) = 1, b(0) = 0, c(0) = 0, d(0) = 0, e(0) = 0, f(0) = 0, g(0) = 0, h(0) = 0, i(0) = 0, j(0) = 0, k(0) = 0, l(0) = 0],
{a(x), b(x), c(x), d(x), e(x), f(x), g(x), h(x), i(x), j(x), k(x), l(x)}, method = laplace);

f1 := sol[6];
f1 := rhs(f1);
g1 := sol[7];
g1 := rhs(g1);
h1 := sol[8];
h1 := rhs(h1);
i1 := sol[9];
i1 := rhs(i1);
j1 := sol[10];
j1 := rhs(j1);
kk := sol[11];
kk := rhs(kk);
l1 := sol[12];
l1 := rhs(l1);

xdata := Vector([0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370,380,390,400], datatype = float);
ydata := Vector([0.0034,0.00392,0.00184,0.00782,0.01873,0.03683,0.11016,0.09838,0.18402,0.24727,0.20901,0.2972,0.37635,0.49235,0.57845,0.4457,0.50285,0.5672,0.62783,0.57264,0.54918,0.44792,0.49795,0.55218,0.47512,0.46473,0.37989,0.32236,0.3323,0.20894,0.28473,0.21273,0.19855,0.13548,0.12725,0.13277,0.0784,0.07969,0.06162,0.03855], datatype = float);

k1 := 0.391491454107626e-1; 
k2 := 0.222503562261129e-1; 


z1:=f1;
z2:=f1+g1;
z3:=f1+g1+h1;
z4:=f1+g1+h1+i1;
z5:=f1+g1+h1+i1+j1;
z6:=f1+g1+h1+i1+j1+kk;
z7:=f1+g1+h1+i1+j1+kk+l1;

Statistics[NonlinearFit](z1,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z1,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

Statistics[NonlinearFit](z2,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z2,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

Statistics[NonlinearFit](z3,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z3,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

Statistics[NonlinearFit](z4,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z4,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

Statistics[NonlinearFit](z5,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z5,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

Statistics[NonlinearFit](z6,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z6,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

Statistics[NonlinearFit](z7,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z7,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

3rd_diss.mw

Hi,

I have a private license of Maple 2018, and am interested in advances in terms of tensor calculus in Maple 2019, in particular concerning applications in general relativity. Three questions:

(1) Is there a way for me to buy the package without having to buy Maple 2019 in full, or would I have to upgrade?

(2) I have seen in the preview video that the features can for instance calculate the Christoffel symbols, the Rieman tensor, etc., from a prescribed metric in a coordinate basis, correct? Can the formalism also handle Expressions expressed in a non-coordinate frame though? So a frame field, for which the commutaror of the basis vector fields does not vanish?

(3) Is there somewhere a nice documentation, with exaples, where I can read on what I can do with the package? The documentation in the "what's new" section on the website is mainly concerned with applications for quantum mechanics, which is not what I am interested in.

Cheers!

If I create  and save a worksheet in Maple 2019, then try to up load it here, it uploads but contents won't display

No issue if I have an "identical" worksheet in Maple 2018.

See the attachment attempts below

#### Result of trying to upload Maple 2019 file here


Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/fibon2019.mw .
 

Download fibon2019.mw

But "same" file from Maple 2018 "works"

#
# Recursive Fibonacci generator
#
  myFib:= proc(n::integer)
               option remember;
               if   n=1
               then return 1
               elif n=0
               then return 0
               else return myFib(n-1)+myFib(n-2):
               fi:
          end proc:

  seq(myFib(j), j=0..20);

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765

(1)

 


 

Download fibon2018.mw

First 708 709 710 711 712 713 714 Last Page 710 of 2425