emendes

440 Reputation

6 Badges

8 years, 25 days

MaplePrimes Activity


These are questions asked by emendes

Hello

I wonder how integrate can be applied term by term to the following nonlinear differential equation

(diff(y(t), t))*(diff(y(t), t, t, t))-(diff(y(t), t))*y(t)^2-(diff(y(t), t))*(diff(y(t), t, t))-(diff(y(t), t))*A*y(t)

The expected output will be something like 

(diff(y(t), t))*(diff(y(t), t, t))-(1/3)*y(t)^3-(1/2)*A*y(t)^2-(1/2)*(diff(y(t), t))^2+C+int((diff(y(s), s, s))^2, s = 0 .. t)
map(x-> integrate(x,t),(diff(y(t), t))*(diff(y(t), t, t, t))-(diff(y(t), t))*y(t)^2-(diff(y(t), t))*(diff(y(t), t, t))-(diff(y(t), t))*A*y(t))

solves most of it but not the first part. 

Many thanks

Ed

 

Hello

I know that anames( 'user' ) recovers the contents of the workspace but I wonder whether it would be possible to recover only the contents of each m-file read within a worksheet.  

Many thanks

Ed

 

Hello

I need to solve or reduce (similar to the command Reduce in Mathematica) sets of nonlinear equations.  One such example is shown below:

eqns := {-1+theta[3, 6] = 0, 1-theta[3, 6] = 0, alpha+rho-theta[2, 2]+theta[3, 3] = 0, -theta[3, 6]^2+1 = 0, theta[2, 2]*theta[3, 6]-alpha = 0, theta[2, 2]*theta[3, 6]^2-alpha = 0, -2*theta[3, 3]*theta[3, 6]-2*rho = 0, theta[1, 2]*theta[2, 1]*theta[3, 6]^2+1 = 0, -alpha^2+rho^2+theta[2, 2]^2-theta[3, 3]^2 = 0, -theta[2, 2]^2*theta[3, 6]+2*theta[2, 2]*theta[3, 3]*theta[3, 6]+alpha^2+2*alpha*rho = 0, -theta[1, 3]*theta[2, 2]^2*theta[3, 0]+theta[1, 3]*theta[2, 2]*theta[3, 0]*theta[3, 3]-alpha^2*beta-alpha*beta*rho = 0, -theta[1, 2]*theta[2, 1]*theta[2, 2]*theta[3, 6]+2*theta[1, 2]*theta[2, 1]*theta[3, 3]*theta[3, 6]-alpha-2*rho = 0, -theta[1, 2]*theta[2, 1]*theta[2, 2]*theta[3, 3]+theta[1, 2]*theta[2, 1]*theta[3, 3]^2+theta[1, 3]*theta[2, 2]*theta[3, 0]*theta[3, 6]+alpha*beta+alpha*rho+rho^2 = 0, -alpha^2*rho-alpha*rho^2+theta[1, 2]*theta[2, 1]*theta[2, 2]-theta[1, 2]*theta[2, 1]*theta[3, 3]+theta[1, 3]*theta[3, 0]*theta[3, 6]-theta[2, 2]^2*theta[3, 3]+theta[2, 2]*theta[3, 3]^2+alpha+beta+rho = 0}

 and the indeterminates are:

fc := {theta[1, 2], theta[1, 3], theta[2, 1], theta[2, 2], theta[3, 0], theta[3, 3], theta[3, 6]}

Since I do know the solution, I issued the following command to check for typos.

seq(subs(theta[1,2]=-1,theta[1,3]=-1,theta[2,1]=1,theta[2,2]=alpha,theta[3,0]=beta,theta[3,3]=-rho,theta[3,6]=1,eqns[i]),i=1..nops(eqns))

and the outcome is zero for all equations.

When I try the command solve as follows:

solve(eqns,fc);

the result is

{theta[1, 2] = theta[1, 2], theta[1, 3] = theta[1, 3], theta[2, 1] = -1/theta[1, 2], theta[2, 2] = alpha, theta[3, 0] = -beta/theta[1, 3], theta[3, 3] = -rho, theta[3, 6] = 1}

that should be right but it is not what I am expecting.  

How can maple return the solution needed?

 

Some sets of solutions do not have a solution as the one above.  Some indeterminates cannot be found, is there a way maple returns the solution of the ones that can be solved and reduced the set of equations into two parts, solved ones e non solved ones?  I can provide an example if needed.

 

Many thanks.

Ed

 

Hello

I have a couple of functions wrapped into a module and want to make them available as a package.  The two modules have been saved as a mpl file.   I read and tried to follow the instructions on the online help (11. Writing packages) but even copying line by line of commands there, they simply did not work at all.    

Problems:

1) After following the instructions on how to add a home dir into libname and saved it .mapleinit (I guess) I issued the commands

restart; libname;

my lib path is not there anymore.  

.mapleinit shows

libname := "mylibdir", libname:

libname:="/Users/eduardo/maple/toolbox/personal/lib", libname:

 

2) After issuing savelib, I did

LibraryTools:-ShowContents(libname[1]);

that returns [];

Could you send me a set of commands showing how to do it, please?  

Many thanks

Ed

PS.  My next step is to write help files for each one of the functions.  

 

Hello

I need to create a list of variables from a list of variables.  I thought of something like the code snippet below but I could not figure out how to force Maple to evaluate the variable before creating the new variables.  It is very likely that my approach is completely wrong and I have to use something altogether different.  

vars:=[x,y,z];
for invars in vars do
[invars||(1..nops(vars))];
end do;

Many thanks

Ed

 

 

First 9 10 11 12 13 14 15 Page 11 of 15