MaplePrimes Questions

Hello

Beginning with a given real fraction, for example 1/12, I would like to find out the following information about its decimal number (here: 0.0833333...):

- decimal number up to period, here 0.08

- the period if exists, here 3

How to program that in Maple?

Thanks a lot for your help!

How 

Where does one find the python module "maple" used to access open maple as in https://www.maplesoft.com/support/help/maple/view.aspx?path=OpenMaple%2fPython%2fAPI ?

Hi:

In a plot title, I want  A^(1)(x) to appear - that is, the first derivative of the function A(x) with the "1" enclosed in brackets because that is the standard notation for derivatives of the special function A.

Alternatively, I'll be happy to use A'(x) - and I know that there are calculus characters on the pallet that are supposed to do that, but they all just become Diff and that is no good for other reasons.

So, here is the closest I've come:

Test:=plots[textplot]([3,3,typeset(A^[1],"(x)")]);

and that almost works, except if I change the [1] to (1), Maple tries to evaluate it as an expression and it disappears. If I change 1 to 2 it works fine, except I want the first derivative.

I've tried quotes, uneval, backquotes and all I get is an error or the quotes showing up as text.

Does anyone know how to do this?

Thank you.

I have the set A := {12, 17, 24, 28} and the set B := {358, 568}. I would like to do the combination (at least that is the name I think I should use) of the two sets to get the following result:

{12358, 12568, 17358, 17568, 24358, 24568, 28358, 28568}

As a bonus, if it's not too complicated, I would like the procedure to see that there are two numbers that have repeating number in them. In fact, the last two elements of the result, namely 28358  and 28568 has two 8. So those last two terms should not appear in the result. We should get only the 6 elements {12358, 12568, 17358, 17568, 24358, 24568}.

There are so many possibilities with Combination and Iterator that I am lost in how to do it. Maybe someone has had to do it before me and have an idea on how to do it.

Thank you in advance for your time.

Mario

For t not equal to nT,   

dS/dt = delta- mu*S+ omega*V; 

 dV/dt = -(omega+mu)*V

For t=nT, 

 S(nT+)=(1-gamma) S(nT);

V(nT+)=V(nT)+ gamma* S(nT),

with the initial conditions  S(0+)=s0

V(0+)=v0

    how to plot the graph with this system of equations,impulsive points and initial conditions  

Hello. In our math lessons, we are laerning about monotonicity within different graph and hereby, we are also working with making a line, describing when the graph is increasing or descreasing (I have uploaded a picture along to describe). 

I havent been able to find any easy way to make a monotonic line within maple, where i dont have to draw them in. This is problematic and will end up taking me a long time in each assignment where its needed. 
Kinds regrads. Samuel Hesselberg

Suppose I have to solve _Z^2 + (epsilon - 1)*_Z - epsilon + theta=0. If I use the code

solve(_Z^2 + (epsilon - 1)*_Z - epsilon + theta, _Z)

I get the solutions  as -epsilon/2 + 1/2 + sqrt(epsilon^2 + 2*epsilon - 4*theta + 1)/2, -epsilon/2 + 1/2 - sqrt(epsilon^2 + 2*epsilon - 4*theta + 1)/2

But I need them as (1 - epsilon)/2 + sqrt((epsilon + 1)^2 - 4*theta)/2, (1 - epsilon)/2 - sqrt((epsilon + 1)^2 - 4*theta)/2

How to modify the code so that I get the roots in the more simplified form, as I have mentioned above. 

Please help. 

Hello,

How I can show that the value of psi 1 through method #1 is equal to that one in method #2?

is possible to verify by analytic results, not using and placing parameter's numerical values?

show.mw

The link to OpenMaple/Python/Examples from https://www.maplesoft.com/support/help/maple/view.aspx?path=OpenMaple seems to be broken, but not sure where to report such an issue.  

I've been writing this code to simulate the orbit of Venus in a simple 2D polar plot, but it keeps telling me that I have insufficient initial conditions, here is the code:

restart:with(Physics):with(VariationalCalculus):with(plots):with(plottools):

R[V] := 0.72*AU: #`starting radius for venus`

AU := 1: #`astronomical unit`

G := 6.674*10^(-11): #`gravitational constant`

m[S] := (333*10^3)*m[E]: #`mass of the sun`

m[V] := 0.815*m[E]: #`mass of venus`

m[E] := 1: #`mass of the earth`

x[V] := t -> r[V](t)*cos(theta[V](t)): #`x-coordinate`

y[V] := t -> r[V](t)*sin(theta[V](t)): #` y-coordinate`

x[VP] := t -> diff(x[V](t), t): #` x-velocity`

y[VP] := t -> diff(y[V](t), t): #`y-velocity`

T[V] := m[V]*simplify(x[VP](t)^2 + y[VP](t)^2)/2: #`kinetic energy of the system`

V[V] := (-G)*m[V]*m[S]*1/r[V](t): #`potential energy of the system`

L[V] := T[V] - V[V]; #`lagrangian of the system`

EL[Vr] := diff(L[V], r[V](t)) - diff(diff(L[V], diff(r[V](t), t)), t) = 0: #` e-l for the r-coordinate`

EL[`Vtheta;`] := diff(L[V], theta[V](t)) - diff(diff(L[V], diff(theta[V](t), t)), t) = 0: #`e-l for the theta-coordinate`

EL[V] := [EL[Vr], EL[`Vtheta;`]]; #` system of equations`

F[V] := G*m[V]*m[S]*1/R[V]^2: #`gravitational force for venus starting position`

omega[V] := sqrt(F[V]*R[V]*1/m[V])*1/R[V]: #`angular velocity for venus starting position`

IC[V] := [r[V](0) = R[V], D(r[V])(0) = 0, theta[V](0) = 0, D(theta[V])(0) = omega[V]]; #`initial conditions, r-position, r-velocity, theta-position, theta-velocity`

SOL := dsolve(EL[V], IC[V], [r[V](t), theta[V](t)], numeric, output = listprocedure); #`numerical solution`

Error, (in dsolve/numeric/type_check) insufficient initial/boundary value information for procedure defined problem
 

I have included both the initial values for r,dr/dt, theta and dtheta/dt.

I'm not sure what other initial conditions I could be missing?

i am facing problem while solving differential equation in loops where conditons are given also in loops. the particular problem occurs while solving Differential equation involving He's Homotopy purturbation method

exact_solution_error.mw

P1=(D1*ga+C1)/(1+ga) and P2= (D1-C1)/(1+ga), How to substitute in the solution of U_exact and Theta_exact

Please help me to solve

Currently, a stand-alone or embeddable Python is by default bundled with Maple and is installed silently (namely, without notification) when installing Maple, but why is there no prompt panel asking for Python configuration (just like Why does Maple ask for a Matlab installation when I install it? and Configuring the Maple Kernel for Jupyter)? 
Actually, I am wondering why I am not capable of installing Maple without bundling Python (even if I am able to clear those files in $MAPLE/Python.$SYS later). In my opinion, a bundling Python suite is more or less unnecessary; wouldn't it be better to provide a tooltip asking for approval? If one really need to interact with Python, one may instruct Maple to make use of some available local version of Python from the outset (rather than having to install an additional Python interpreter with numerous extra packages that occupy almost 2 GB!), and if one does not require such a functionality, one can simply skip the Python installation and free up 2GB immediately. So, will installing Python (or another popular external program, if it is going to be integrated or connected with Maple in future releases) be optional during the Maple installation process? 

Questions are as follows:

Consider a g function, for example: g = 1 - (x_1 - 1)^2/9 - (x_2 - 1)^3/16;

Among them, x_1 and x_2 each conform to the normal distribution, and each has a mean mu_1 mu_2 and a variance sigma_1 sigma_2;

mu_1 and mu_2 both obey uniform distribution (-0.2, 0.2) respectively; sigma_1 and sigma_2 both obey uniform distribution (0.8, 1.2) respectively;

Set parameter theta = (theta_1, theta_2, theta_3, theta_4)^T = (mu_1, mu_2, sigma_1, sigma_2)^T;

It should be possible to obtain an analytical solution with only theta for the mean and variance of the g function, such as:

 

  1. Ey = -(1/9)*theta[1]^2 + (2/9)*theta[1] + 137/144 - (1/16)*theta[2]^3 + (3/16)* theta[2]^2 - (3/16)*theta[2] - (3/16*(-1+theta[2]))*theta[4]^2 - (1/9)*theta[3 ]^2;
  2. Vy = (1/20736)*(9*theta[2]^3 + 16*theta[1]^2 - 27*theta[2]^2 - 32*theta[1] + 27*theta[2] - 137)^2 + (15/256)*theta[4]^6 + (45/256*(theta[2]^2 - 2*theta[2] + 1))*theta[4]^4 + ( 1/768*(45*theta[2]^4 + 32*theta[1]^2*theta[2] - 180*theta[2]^3 - 32*theta[1]^2 - 64*theta[ 1]*theta[2] + 270*theta[2]^2 + 64*theta[1] - 436*theta[2] + 301))*theta[4]^2 + (1/27)*theta[ 3]^4 + (1/216)*theta[3]^2*(3*theta[2]^3 + 16*theta[1]^2 - 9*theta[2]^2 - 32*theta[ 1] + 9*theta[2] - 35) + (1/24)*theta[3]^2*(-1+theta[2])*theta[4]^2;

 

But I can't find the above analytical solution. The code I wrote in maple is as follows:

 

restart;

with(Statistics);

x[1] := RandomVariable(Normal(theta[1], theta[3]));

x[2] := RandomVariable(Normal(theta[2], theta[4]));

g := 1 - (x[1] - 1)^2/9 - (x[2] - 1)^3/16;

theta[1] := RandomVariable(Uniform(-0.2, 0.2));

theta[2] := RandomVariable(Uniform(-0.2, 0.2));

theta[3] := RandomVariable(Uniform(0.8, 1.2));

theta[4] := RandomVariable(Uniform(0.8, 1.2));

mean := Mean(g);

variance := Variance(g);

mean;

variance;

 

As a result, after clicking Run, the following problems occur:

Problem 1: The program takes a very long time to run

Problem 2: The program results did not meet expectations, because the results I expected were:

Ey = -(1/9)*theta[1]^2 + (2/9)*theta[1] + 137/144 - (1/16)*theta[2]^3 + (3/16)* theta[2]^2 - (3/16)*theta[2] - (3/16*(-1+theta[2]))*theta[4]^2 - (1/9)*theta[3 ]^2;

Vy = (1/20736)*(9*theta[2]^3 + 16*theta[1]^2 - 27*theta[2]^2 - 32*theta[1] + 27*theta[2] - 137)^2 + (15/256)*theta[4]^6 + (45/256*(theta[2]^2 - 2*theta[2] + 1))*theta[4]^4 + ( 1/768*(45*theta[2]^4 + 32*theta[1]^2*theta[2] - 180*theta[2]^3 - 32*theta[1]^2 - 64*theta[ 1]*theta[2] + 270*theta[2]^2 + 64*theta[1] - 436*theta[2] + 301))*theta[4]^2 + (1/27)*theta[ 3]^4 + (1/216)*theta[3]^2*(3*theta[2]^3 + 16*theta[1]^2 - 9*theta[2]^2 - 32*theta[ 1] + 9*theta[2] - 35) + (1/24)*theta[3]^2*(-1+theta[2])*theta[4]^2; 

 

so,i dont know where i am wrong ,how could i obtain the expected solution?

 

I am trying to replace thickness = 0 with thickness = 3 in a list, under the condition leader = 0 

The order of entries in the list is not fixed so it is more akin to a set.

leader:=1;

parms:=[colour=red,thickness=0,linestyle =dash];
 if leader=0 then selectremove(thickness=0,parms);end if;
[op(parms),thickness=3];
display(plottools:-line([1,2], [3,4]),op(parms));
First 6 7 8 9 10 11 12 Last Page 8 of 2308