MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

i have to compute lie algebra condition by using maple 15, but currently i have code in maple 5.,

i already try to run in maple 15 but it say 'error,unable to match delimeters'
i try to find error, but i cant find it..
the coding are here...


local  i,j,k,l,m;  

for i from 1 by 1 to n do

for j from 1 by 1 to n do  

for k  from 1 by 1 to n do    

if A[i,i,k]<>0 then  

RETURN ('Input is NOT a Lie algebra (',i,i,k,')=',A[i,i,k], 'is not zero');  

elif A[i,j,k]+A[j,i,k]<>0 then  

RETURN ('Input is NOT a Lie algebra,(',i,j,k,')+(',j,i,k,')=',A[i,j,k]+A[j,i,k],'is not zero');  


for 1 from 1 by 1 to n do


simplify(sum(A[i,j,m]*A[m,l,k]+A[j,l,m]*A[m,i,k]+A[l,i,m]*A[m,j,k],   m=1..n))<>0  


RETURN('Input is NOT a Lie algebra---the Jac(',i,j,l,') is not zero');    







print('Yes,input IS a Lie algebra');  


can anyone help me here? Thank You..

Here, i attached the result in printscreen


I ues the optimization tool in Maple2015.

In my experience, Maple optimizatiom tool just shows the optimum values, not a history of the optimizatiom process.

I want to know how I can obtain the history of the optimization process, such as values of the objective, constraints, and tolerance at every iteration.

Is there anyone who knows how to obtain the history data of the optimization process?


Do you have physical components like MOSFETs and IGBTs in your library? How can I have a look at the tool and library block sets?

Hi everyone,

I am trying to solve the equation of heat tranfer, time dependent, with particular Initial and boundary conditions but I am stuck by technical problems both in getting an analytical solution and a numerical one.

The equation

the equation.

I defined a and b numerically. domain is : and I defined surf_power numerically.

The initial condition is : , T0 defined numerically

The boundary condition is : , because it has a shperical symetry.

To me, it looks like a well posed problem. Does it look fine ?

Problem in analytical solution :

It doesn't accept the boundary condition so I only input the initial condition and it actually gives me back an expression that can be evaluated but it never does : I can't reduce it more than an expression of fourier which I can't eval. The solution :
The solution calculated in (0,0). I was hoping T0...

Are you familiar with these problems ? What would be the perfect syntax you would use to solve this ?

The numerical solution problems :

Sometimes it tells me that my boundary condition is equivalent  to 0 = 0, and I don't see why. Some other times it tells me I only gave 1 boundary/initial condition even if I wrote both. Here is what I wrote for example :

(because it kept asking me to add these two options : 'time' and 'range')

Are you familiar with these problems ? What would be the perfect syntax you would use to solve this ? I must at least have syntax problems because even if I keep reading the Help, it's been a long time since I used Maple.

Thank very much for any indication you could give me !


I want to refer to the first element in a list such as x:=[1,2,3] as x[0] not x[1].

How to do it?

Hello Mapleprime members


I am having an issue with a Maple script I have written that reads in a separate Maple script at the start of the code which deals with regular Jacobian transformations I apply to the problem and got tired writing it each time so externalised it and read it in each time.

On Maple 2015 on my Mac there is nothing wrong with the script and it runs without issue.


When I run it on Maple 17 on my linux machine It says the read in file does not exist and the only difference between both machines is the home directory path. (or perhaps version of Maple, but I have used thew following commands in older Maple versions)


The Maple script has this at the top:


Expspath:=cat(home,"Pathway to the file to be read in");

I am simply getting Maple to find the home directory and apply it to the start of the file path which i thought would universally work between machines, and allow the running of Maple scripts between operating systems.

When I run the program on the linux Maple 17, printing Expspath from above gives  exactly where the file is located as it finds the home directory correctly and uses the correct filepath, it just says it does not exist. is there something obvious I am missing?

The Maple file to be read in is on Dropbox so just after the home directory is /Dropbox. If that makes any difference. In both instances the file path is where the file is located (exact match) but the mac will read in the file and linux says it does not exist even though it is the correct filepath.


Any help would be appreciated


- Yeti


Consider the following function.

f (x) = ( x3 − 442x2 + 65107x − 3196058) e1/x 

Use Newton's method to find all 3 roots (correct to at least 6 decimal places) of f (x). (Note that you might have to increase the 'Digits' variable to 15, i.e., Digits:=15, in order to get the required accuracy.)

 my answer are 143.2030067,143.2030339,143.2030610

but, it is wrong. can anyone tell me where is the wrong part?


I am attempting to solve a system of second order ODEs. I place conditions on the solutions and use the solve command to figure the correct constants for the general solutions of the ODEs; however, the conditions do not appear to hold after I substitute the constants back into the general solutions. Any help would be greatly appreciated. Here's the code and an explanation:

First some constants

> A := 1; B := 9/10;
> j := 1-1/B;

 This is our homogeneous odes. I will give the general solutions of the inhomogeneous system momentarily 

> eqnv1 := diff(v1(x), `$`(x, 2)) = (1-1/(j+1))*v1(x)+v2(x)/(j+1);
> eqnv2 := diff(v2(x), `$`(x, 2)) = -v1(x)/(A*(j+1))+(B/A+1/(A*(j+1)))*v2(x);

Next we get the general solution of this sytem of odes.

> soln := dsolve([eqnv1, eqnv2])

Next we have our solutions of the inhomogeneous problem1. Basically solution v1neg, v2neg on [0,xi] and v1pos, v2pos on [xi,1]. We will assume v1,v2 are C^1 across xi; however, the location of xi is not known at this time so they must remain split.

> v1neg := op([1, 2], soln)-1;
> v2neg := op([2, 2], soln)-1/B;
> v1pos := op([1, 2], soln)+1;
> v2pos := op([2, 2], soln)+1/B;

There's probably a better way to do this, but I relabeled the constants:

> v1negc := subs([_C1 = a[1], _C2 = a[2], _C3 = a[3], _C4 = a[4]], v1neg);
> v2negc := subs([_C1 = a[1], _C2 = a[2], _C3 = a[3], _C4 = a[4]], v2neg);
> v1posc := subs([_C1 = a[5], _C2 = a[6], _C3 = a[7], _C4 = a[8]], v1pos);
> v2posc := subs([_C1 = a[5], _C2 = a[6], _C3 = a[7], _C4 = a[8]], v2pos);

Next we have eight conditions the solutions must satisfy. Namely v1, v2 are C^1 across xi and v1',v2' are 0 at {0,1}.

> syscon1 := subs(x = xi, v1negc) = subs(x = xi, v1posc);
> syscon2 := subs(x = xi, v2negc) = subs(x = xi, v2posc);
> syscon3 := subs(x = xi, diff(v1negc, x)) = subs(x = xi, diff(v1posc, x));
> syscon4 := subs(x = xi, diff(v2negc, x)) = subs(x = xi, diff(v2posc, x));
> syscon5 := subs(x = 0, diff(v1negc, x)) = 0;
> syscon6 := subs(x = 0, diff(v2negc, x)) = 0;
> syscon7 := subs(x = 1, diff(v1posc, x)) = 0;
> syscon8 := subs(x = 1, diff(v2posc, x)) = 0;

We solve to get the constants for the solutions.

> constants := simplify(evalf(solve({syscon1, syscon2, syscon3, syscon4, syscon5, syscon6, syscon7, syscon8}, {a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]})));

We substitute the values for the constants.

> a[1] := op([1, 2], constants); a[2] := op([2, 2], constants); a[3] := op([3, 2], constants); a[4] := op([4, 2], constants); a[5] := op([5, 2], constants); a[6] := op([6, 2], constants); a[7] := op([7, 2], constants); a[8] := op([8, 2], constants);

Lastly we try to verify that the conditions from earlier hold:

> evalf(subs(xi = .2, subs(x = xi, v1negc-v1posc)));
> evalf(subs(xi = .2, subs(x = xi, v2negc-v2posc)));
> evalf(subs([x = 0, xi = .2], diff(v1negc, x)));

They should hold for any xi, but they don't appear to. All of these should be 0. For a large xi, the numbers get very large so I was thinking perhaps roundoff error, but even when I do an exact solution and then evalf just at the end, I still have large error so I'm not sure what the problem is. Sorry for the long question. Thanks so much for the help.

Hi!! i am working on assignment.

h:= x-> (x^17-x*sin(x^16))/x^49+exp(sqrt(x+8))*ln(abs((cos^4*(x)-5)));


i want to find the value of the h(10)

i use eval , but it comes out a function, not a solution.!!

I'm trying to solve a fourth order ODE but for some reason I only end up with three constants at the end. I'm using Maple 16. Here's the code I have been using:

dsolve(diff(x(t), t$4)+4*diff(x(t), t$2)-4*x(t)+1);

The output is 

x(t) = 1/4+_C1*exp(sqrt(-2+2*sqrt(2))*t)+_C2*exp(-sqrt(-2+2*sqrt(2))*t)+_C3*exp(-I*sqrt(2+2*sqrt(2))*t)

When I try to solve the homogeneous equation I get the expected four linearly indep solutions:

x(t) = _C1*exp(-sqrt(-2+2*sqrt(2))*t)+_C2*exp(sqrt(-2+2*sqrt(2))*t)+_C3*exp(-I*sqrt(2+2*sqrt(2))*t)+_C4*exp(sqrt(-2+2*sqrt(2))*t)

Adding 1/4 to this gives me the general solution I would expect, but I don't see why I should need to do this step. I'm at a loss for what I am doing wrong so any help would be greatly appreciated. Thanks in advance.





Vectors are defined by a lenth and an angle.

The arrow command wants me to give it a starting point and an endpoint in coordinates, for example:



gu := arrow([5, 10], [15, 20], .2, .4, .1, color = green)

I'm dealing with vectors from electrical circuits, so the information I have would be the lenth of the vector, and an angle given in degrees (which I could convert to radians if needed for the plot).

The goal is to plot all the vectors in the circuit on the same display so that it can be seen how they are in relation to each other, and to visualise the solution. This means I would need to find out the endpoint of the arrows to start the next arrow at that location with its angle in reference to the same axis. Does it make sence? I'm not sure about the wording of this.

Here's a picture of a calculated vector lenth and angle:

So, the -45 degrees would need to be in reference to the y-axis for example, then the next vector can be placed at lets say perpendicular in reference to the vector sol_1, starting at its endpoint.

The only other way I have to draw this, excluding doing it by hand, is using the object tools from microsoft word, and to be honset I dislike using word for math stuff. I would much rather learn the syntax for Maple to do this.


I hope someone knows what I mean, Please ask if somethig is unclear,








how to plot exp(f)*erf(g) where f and g are complex function


del from -100e-15 to 100e-15



Population at point A is 500. Point B 200. See pics.

where is the best point to meet such that the total distance is minimized. Can only go "taxi way", no diagonals allowed.

[the answer is (5,5).

Solution given: sumPop/2=~7 units. Left-right sum7 occurs at C, x=5. Bottom-top sum7 occurs at B, y=5].

there must be a better (Maple) way...

Are comma's ever used in denominators?

Just curious, since when say transcribing code from a book and you're in the denominator pushing the comma should automatically move you over and up to where one should be placed.  Not that it really matters but if it's easy to implement that would be a luxury (unless of course commas are used in denominators).

I am creating a plot but the numbers on the horizontal axis overlap.  Is there a way to change the directions of the numbers displayed under the horizontal axis (tickmark labels) from horizontal to vertical?

The picture below shows how the numbers are bunched together under the horizontal axis.  I'd like them to be displayed vertical



Thank you

1 2 3 4 5 6 7 Last Page 2 of 1208