Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Could you help me how to deal with this problem?

restart;

with(plots):with(plottools):with(DETools):

 

Sys:=diff(T(R),R)=((1-1/R)*(sqrt(1-(alpha/R)^2*(1-1/R))))^(-1),diff(Phi(R),R)=(alpha/R)^2*(sqrt(1-(alpha/R)^2*(1-1/R)))^(-1);

diff(T(R), R) = 1/((1-1/R)*(1-alpha^2*(1-1/R)/R^2)^(1/2)), diff(Phi(R), R) = alpha^2/(R^2*(1-alpha^2*(1-1/R)/R^2)^(1/2))

(1)

 

inits:=[[T(0)=0.5,Phi(0)=0],[T(0)=0.5,Phi(0)=Pi/4]];

[[T(0) = .5, Phi(0) = 0], [T(0) = .5, Phi(0) = (1/4)*Pi]]

(2)

K:=dsolve([Sys,op(op(1,inits))],[Phi(R),T(R)],numeric,parameters=[alpha],output=listprocedure);

Error, (in dsolve/numeric/make_proc) ode system is singular at the initial point

 

 

Download HW6.m

The linearfit in Maple has the option to output the covariance matrix.  I do not see that option for nonlinear fitting.  Am I missing something?

what is wrong..in the past ..this equations was solved..now it doesnt' solved anymore...integral equations

total_PE.mw

hello sir..i'm new..and i want to know how to put command prompt ..between two command line .i read but i didn't find..

Essentially, this issue is only about how to make the graph look relatively more aesthetically pleasing.

It seems that the color of the arrowheads in a directed graph is consistent with the color of the edges, and their shape also seems to be unchangeable. I wonder if I missed something.

with(GraphTheory):
G := Digraph({[1, 2], [2, 3], [3, 4], [4, 1]});
DrawGraph(G, stylesheet=[vertexborder=false,vertexpadding=5,edgecolor = "Black",vertexcolor="MistyRose",edgethickness=2],size=[250,250]);

 

For example, I would like to draw it in the following style, where the arrowhead color of the directed edge "[1,2]" is red, and the arrowhead of the edge [3,4] is hollow.

Interestingly, the layer where the arrowhead is located seems to always be below the layer of the straight edge, making it impossible to cover it. I prefer the following style (adjusted using Inkscape).

 

 

 

 

 

 

 

 

 

 

Of course, it would be better if the two black arrowheads could be further apart. This can be easily achieved with other vector software. I wonder if it is easy to implement in Maple.

Linear combinations of random variables: why Maple does not "inherit" the distributional assumptions when adding up two random variables?

In the script I attach below, I first define a vector of two uncorrelated gaussian RVs [epsilon[1],epsilon[2]] and then a vector of two correlated gaussian RVs [nu[1],nu[2]]. Both epsilon[1] and epsilon[2] are also uncorrelated with nu[1] and nu[2].

Now I want to create a vector of two correlated gaussian RVs, S, where S[1]=nu[1]+epsilon[1] and S[2]=nu[2]+epsilon[2]. The means and the variances of [S[1],S[2]] are correct, but the covariance (off-diagonal element of the covariance matrix) is weird. How to do this in Maple?

Please check this script:

RVs_sum.mw

 

If I have a pde with multiple constants (for example a and b) in them such that some are fixed constants (say k) and some terms are undetermined constants , how do I put that in a PDE such that Maple knows to solve the equation not for arbritary k (in case no solution exists), but any k such that k is not a function of the differentiating variable.

hey guys...please watch my file and help me. when i call(Am)...it only shows last value. how can i get all (Am) value in like seq or table

restart

with(LinearAlgebra):

i := [seq(2*i-1, i = 1 .. 10)];

[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]

(1)

for i in i do A[m] := (x/a)^(i+1)*(1-x/a)^2 end do;

x^2*(1-x/a)^2/a^2

 

x^4*(1-x/a)^2/a^4

 

x^6*(1-x/a)^2/a^6

 

x^8*(1-x/a)^2/a^8

 

x^10*(1-x/a)^2/a^10

 

x^12*(1-x/a)^2/a^12

 

x^14*(1-x/a)^2/a^14

 

x^16*(1-x/a)^2/a^16

 

x^18*(1-x/a)^2/a^18

 

x^20*(1-x/a)^2/a^20

(2)

``

Download 3.mw

when i call(Am)...it only shows last value. how can i get all (Am) value in like seq or table

i want to solve..this what is happening..i used maple not a long time ago.help me

restart; with(LinearAlgebra)

i := 1;

1

(1)

w := c[i]*(x/a)^(i+1)*(1-x/a)^2*(y/b)^(i+1)*(1-y/b)^2;

c[1]*x^2*(1-x/a)^2*y^2*(1-y/b)^2/(a^2*b^2)

(2)

(1/2)*(int(int([D__11*(diff(w, x, x))^2+2*D__12*(diff(w, x, x))*(diff(w, y, y))+4*D[66]*(diff(w, x, y))^2+D[22]*(diff(w, y, y))^2-2*q*w], x = 0 .. b), y = 0 .. a))

Error, (in int) wrong number (or type) of arguments: for an operator integrand a range without a variable of integration is expected, got x = 0 .. b

 

``

Download 2.mw

Given a list of equations say: eq1 := [diff(kk(r), r) = 0, ff(r)*1/2 = 0], how would i extract just the left hand side of each element ?
[diff(kk(r), r) , ff(r)*1/2 ]

Is there a way to compute the Riemann tensor for two different metrics in the physics package without each time setting up the metric. For example you just put the metric as an argument to do so in the differential geometry package.

I obtain the adjacency matrix from a graph. We know that it is indexed according to the order of vertices in the Vertices. But what if I want to rearrange it in a different order? Here is a specific example.

with(GraphTheory):
g:=Graph({{2,3},{1,2}});
Vertices(g); #[1,2,3]
AdjacencyMatrix(g);

I would like to display this matrix in the order of [3, 1, 2].

Hi

I get the following error: "Error, (in dsolve) invalid input: 'PDEtols/sdsolve' expects its 1st argument, SYS, to be of type OR(set(..."

I don't know what's wrong. My equations look like a set to me.

My equations:

{0 = -F__Ay - F__By, 0 = 25*F__Oy + 25*F__Ay - 25*F__By, diff(theta__1(t), t)*t - theta__1(t) = 0, -x__1(t) + 25*cos(theta__1(t)) = 0, -y__1(t) + 25*sin(theta__1(t)) = 0, (2500*cos(theta__1(t))*diff(theta__1(t), t)*pi)/3 - 50*cos(theta__1(t))*diff(theta__2(t), t)*theta__2(t) = F__Ax + F__Ox + F__Bx, (2500*cos(theta__1(t))*diff(theta__1(t), t)*pi)/3 - 50*cos(theta__1(t))*diff(theta__2(t), t)*theta__2(t) = F__Ay + F__Oy + F__By, diff(theta__2(t), t)*t - Pi/4 - theta__2(t) = 0, x__1(t) + 25*cos(theta__1(t)) - x__2(t) - 50*cos(theta__2(t)) = 0, y__1(t) + 25*sin(theta__1(t)) - y__2(t) - 50*sin(theta__2(t)) = 0, (1250*cos(theta__1(t))*diff(theta__1(t), t)*pi)/3 = -F__Ax - F__Bx, (1250*cos(theta__1(t))*diff(theta__1(t), t)*pi)/3 = -50*F__Ay + 50*F__By}

My solve:

dsolve({eqs[1] = 0, eqs[2] = 0, eqs[3] = 0, eqs[4] = 0, eqs[5] = 0, eqs[6] = 0, eqs_Mq[1] = eqs_g[3], eqs_Mq[1] = eqs_g[6], eqs_Mq[2] = eqs_g[1], eqs_Mq[2] = eqs_g[2], eqs_Mq[3] = eqs_g[4], eqs_Mq[3] = eqs_g[5]}, numeric)

Anyone can tell me what I'm doing wrong?

clutch.mw

I have say a

1) n cross n matrix A

2)  n cross 1 matrix B

I want to elementwise divide that is /~ each column of  by B and store in A itself like this 

If b_1 is in B and a_11 is in A i want   b_1/~a_11 in a_11

That is i divide

B /~ A first column

B /~ A second column

Like that for all its n columns

Kind help please

It seems once in a while someone asks about converting from degrees minutes seconds format to decimal or the other way around. 

I created a little procedure for just that purpose. 

restart; gc()

NULL

A little procedure to convert the form of degrees, minutes, seconds to decimal and vice versa.  

NULL

dms := proc (d, m := 0, s := 0) local con, d1, d2, d3; if 0 < frac(d) then d1 := floor(d); d2 := floor(60*frac(d)); d3 := 60*frac(60*frac(d)); con := cat(d1, `° `, d2, `' `, d3, `"`) else con := d+m/60.+s/3600. end if; print(con) end proc

NULL

Examples of use.

 

dms(45.2365)

`45° 14' 11.4000"`

(1)

dms(45, 14, 11.4)

45.23650000

(2)

NULL

Download dms.mw

edit - a quick realization is to remove the decimals that changes the fractions to floating decimals and change print(con) to print(evlaf(con)) to avoid rounding issues.

First 210 211 212 213 214 215 216 Last Page 212 of 2218