MaplePrimes Questions

I am trying to use Maple to solve a set of 5 equations, but cannot get a solution. Or there is no solution??

Any help? (Yes, the L function is a likelihood function and I am doing MLE for 5 variables..)


 

``

h := 4

4

(1)

k := Matrix(3, 4, {(1, 1) = 11.0, (1, 2) = 7.0, (1, 3) = 7.0, (1, 4) = 11.0, (2, 1) = 5.0, (2, 2) = 7.0, (2, 3) = 12.0, (2, 4) = 12.0, (3, 1) = 1., (3, 2) = 9.0, (3, 3) = 7.0, (3, 4) = 19.0})

Matrix(%id = 18446746279852723246)

(2)

A := Vector[row](3, {(1) = 6.0, (2) = 13.0, (3) = 18.0})

Vector[row](%id = 18446746279852713854)

(3)

B := Vector[row](3, {(1) = 3.0, (2) = 4.0, (3) = 4.0})

Vector[row](%id = 18446746279852763126)

(4)

"l(N1,M1,lambda,phi,r):=product((phi*(N1-'B[i]'+r*'A[i]'))^('k[i][1]')*(1/(2)*lambda*(M1-'A[i]'))^('k[i][2]'+'k[i][3]')*(1-phi*(N1-'B[i]'+r*'A[i]')-lambda*(M1-'A[i]'))^('k[i][4]')   ,i=1..(h-1))"

proc (N1, M1, lambda, phi, r) options operator, arrow, function_assign; product((phi*(N1-'B[i]'+r*'A[i]'))^'k[i][1]'*((1/2)*lambda*(M1-'A[i]'))^('k[i][2]'+'k[i][3]')*(1-phi*(N1-'B[i]'+r*'A[i]')-lambda*(M1-'A[i]'))^'k[i][4]', i = 1 .. h-1) end proc

(5)

``

``

NULL

fsolve({diff(ln(l(N1, M1, lambda, phi, r)), M1) = 0, diff(ln(l(N1, M1, lambda, phi, r)), N1) = 0, diff(ln(l(N1, M1, lambda, phi, r)), lambda) = 0, diff(ln(l(N1, M1, lambda, phi, r)), phi) = 0, diff(ln(l(N1, M1, lambda, phi, r)), r) = 0}, {M1, N1, lambda, phi, r}, N1 = 0 .. infinity, M1 = 0 .. infinity, lambda = 0 .. 1, phi = 0 .. 1, r = 0 .. 1)

``


 

Download PlayGround.mw

Please, is it possible to enlarge the vertices of a graph (DrawGraph in GraphTheory)? Thanks

Hi there, 

 

I am trying do to a solve procedure, so you can solve an equation using the following argument. 

Solution(eqn, value, var) which uses the embedded solve command. 

When is an integer it works fine with this code here. 

MySolution:=proc(xl::algebraic,is::integer, x::algebraic)
return solve(xl=is,x);
    end proc; 

However the problem arises when I will like to make it to recognize is a an decimal number aka float. 

MySolution:=proc(xl::algebraic,is::integer, x::algebraic)
    return solve(xl=is,x);
    if type(is,float) then
return solve(xl=is,x);
    end proc; 

Any idears on what I am doing wrong? 

Many thanks in advance and have a nice day.

I would like to find a fixed point of f^4 in tems of a and b. I define function as

 

I calculate f(f(f(f(x,y))))  and Iet f(f(f(f(x,y)))) = (x,y), then use the solve command as:

solve({b^4*(a*(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)-(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)^2-(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)*b^2*(a*x-x^2-x*y)*x*y)*(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)*(a*x-x^2-x*y)*x*y = y, a*(a*(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)-(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)^2-(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)*b^2*(a*x-x^2-x*y)*x*y)-(a*(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)-(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)^2-(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)*b^2*(a*x-x^2-x*y)*x*y)^2-(a*(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)-(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)^2-(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)*b^2*(a*x-x^2-x*y)*x*y)*b^3*(a*(a*x-x^2-x*y)-(a*x-x^2-x*y)^2-(a*x-x^2-x*y)*b*x*y)*(a*x-x^2-x*y)*x*y = x}, {x, y})

My computer was freezing. How can I get my result. Thank you

 

How would I solve a linear algebra differential equation with initial conditions.

 

For example, what if I had:

 

x'(t) = [1 2 ; 3 4] x(t) such that the ics: (0,1)

 

I try to write a Maple Code. But I can' t finish it. 

This is very important for me. Could you help me? download_Maple Code.mw

I am using foslve to get the numerical solution of a very complex equition. When I rerun the code with different Digits settings, I got different solutions. I guess it is not surpprising since it is a numerical solution, but how can I trust/choose which one to use?? Is there anyway to unify the solutions regardless the Digits settings.

This attached are when Digits:=30 and Digits:=20 respectively.. Note, the K is a very large nubmer.. the X is a beta distribution..

Hi guys, 

I have tried to create a loop to solve a set of two equations, but can't seem to get it working. My initial equations are given by;

 

nstar := (F, L, sigma) -> ceil((ln(k*F) - ln(c(L, sigma)*B))/ln(Phi(L, sigma)))

 

and 

 

i := (F, L, sigma) -> r*(1 - (G(L, sigma)*Phi(L, sigma))^nstar(F, L, sigma)*B/F)/(1 - G(L, sigma)^nstar(F, L, sigma))

 

in which both are based on further rather simple equations. To these I am trying to apply the proc function where I am trying to find which i makes borth the equations above work :

 

i := proc(F,L,sigma)  

local k :=0.01 ;  

local eps := 0.01 ;  

do while(eps>0.001)  

nstar:= (6)

i := (7)

eps:= i -k:

k=i:

end do;

k;

end proc;


Error, Got internal error in Typesetting:-Parse : "'_Inert_DELAYLESSTHAN' is not a valid inert form"
 

But as you see I am here getting a error which I have not managed to fix. Can anyone see where I might have gone wrong? Could this be done by solve or fsolve? If yes, then how (have tried it as well without succeding)?

help me! 

 

I have a problem with the system, looking forward to everyone's help!

I have a lot (2000+) of irregular 3D data in an nx3-Matrix "M" (in the added example created via RandomMatrix, in reality actual experimental data), representing 3d coordinates. I manage to create a 3d plot of M via surfdata.

I also have a 3d-function "UC", I want to plot this function when it results into "1". I managed to plot this via implicitplot3d.

So far, so good, see the Maple file. (In reality, the UC function should be approximating the data in M, which obviously isn't the case here because of the randomisation :-)

But I actually want a 2D version of these plots:

  • with contour lines for equal values of the third column in M (the vertical axis) for the surfdata.
  • with contour lines for equal values of "n" in the UC function.
  • a combination of the two above in the same plot (M and UC together, as in the last 3D plot in my example, but in a 2d version). Of course, then there should be some way to make a distinction between the contour lines of M and UC (by using colours or appropriate symbols? Or one of the plots with clour bands, the other with contour lines?)

Is this at all possible? I've been trying by adding "dimension=2", "contour=10", ....: all efforts without succes....

Any help appreciated!

Stef


 

restart``

with(ExcelTools)``

with(LinearAlgebra); with(CurveFitting); with(Interpolation); with(plots); with(Statistics)NULL

``

NULL

M := RandomMatrix(200, 3, generator = 0 .. 1.00)

sdRES := surfdata(M); plots:-display(sdRES)

 

NULL

NULL

NULL

NULL

a := .45

.45

(1)

UC := proc (n, m__yy, m__zz) options operator, arrow; m__yy^2/min(1, (1-n)/(1+(-1)*.5*a))^2+(m__zz/`if`(n <= a, 1, 1-(n-a)^2/(1-a)^2))^max(1, 5*n) end proc

sdUC := implicitplot3d(UC(n, m__yy, m__zz) = 1, m__yy = 0 .. 1, m__zz = 0 .. 1, n = 0 .. 1, numpoints = 10000)

display(sdUC)

 

display({sdRES, sdUC})

 

NULL


 

Download test.mw

 

 

expand((x-c)^2+(y-d)^2-R^2) = 0; algsubs(-R^2+c^2+d^2 = f, %); P := proc (x, y) options operator, arrow; -2*x*c-2*y*d+x^2+y^2+f = 0 end proc; 2 2 P := (x, y) -> -2 x c - 2 y d + x + y + f = 0 P(a*cos(theta), b*sin(theta)); G := unapply(%, theta); #usage des formules d'Euler simplify(expand(4*(exp(I*theta))^2*subs(cos(theta) = (exp(I*theta)+exp(-I*theta))*(1/2), sin(theta) = (exp(I*theta)-exp(-I*theta))/(2*I), G(theta)))); poly := sort(subs(exp(I*theta) = X, exp((2*I)*theta) = X^2, exp((3*I)*theta) = X^3, exp((4*I)*theta) = X^4, %)); coeff(lhs(poly), X^4)/tcoeff(lhs(poly)); # exp(I*theta1),exp(I*theta2),exp(I*theta3),exp(I*theta4) sont les racines de ce polynôme unitaire : exp(I*theta1)*exp(I*theta2)*exp(I*theta3)*exp(I*theta4) =1 exp(I*(θ1+θ2+θ3+θ4)=1 d'où θ1+θ2+θ3+θ4 ≡ 2*Pi

I am trying to construct a procedure which makes a boxplot from a list using the statistics package. 

I have come to this here. However it shows both the x and y - axis. Is there any way to make it show a horizontal boxplot like in my code. But only displays the x- axis ? Meaning the values from the plot? Plus any to make it not stick to x-axis like my code does? I tried the command scale, but it doesn't work in statistics package 

    BoxP:=proc(xd::list) 
        uses Statistics:
        return plots[display](BoxPlot(xd,deciles = false,orientation=horizontal),size=[600,400],axes=normal);
    end proc;

Assume 

matrix([[1,0],[0,1]]) * matrix[[y],[y']]
= a system 

 

how to get back matrix([[1,0],[0,1]]) from this system in general method if the system is very large?

Is there a function to convert recurrence equation to a system of equations?

 

I think we will write nested for loops or nested sequences. But I can' t achieve.

Could you help me?

EDITED AND EXTENDED:

In fact, the original question is as follows:

and

where it is a standard inner product on L^2 and u(x,t) is a function. For example; u(x,t) =x*t etc.

(The screenshots is taken from a book)

I want to write a code for finding Matrix U whose elements are u_ij.

First 621 622 623 624 625 626 627 Last Page 623 of 2427