MaplePrimes Questions

Hi

Keep getting "Error, null" on every calculation i make. It indicates hidden spaces or something weird????.

Screenshot of it is included. 

https://imgur.com/a/wSdUeqe

Would be great with a fix or some help because this is driving me mad....

I have  a:=1; b:= 2; c:=1; d:= 6; e:= 2;

P:= a*b*c*d*e;

How do I get  P:=1*2*1*6*2  result with the Maple command?

Thank you for your help!

Hello,

I have a term:

eq:=2*cosh(xi)^8*alpha*B[2]^2 + 4*A[2]*sinh(xi)^6*cosh(xi)^2 + 4*A[1]*sinh(xi)^5*cosh(xi)^3 + 4*sinh(xi)^4*cosh(xi)^4*A[0];

I want to extract the coefficient of for example "sinh(xi)^6*cosh(xi)^2" but the following codes failed:
coeff(eq,(sinh(xi)^6)*(cosh(xi)^2));

frontend(coeff,[eq,(sinh(xi)^6)*(cosh(xi)^2)]);

please help me to solve it.

Thanks in advance.

It would be nice to have the file name in addition to the name of the code attachment on the top.

I enter ...

5*a^2 + 2*b - 7 = 0

a:=1

b=

and get b=b not b=1

I thought I figgured out how to do this a couple of weeks ago but after an absense from Maple Flow I'll be darn'd if I can remember how to make it work.

Of course I can manually manulape the the equation...

b := (-5*a^2 + 7)/2

a:=1

then enter b =

and get the rusults 1 ... but I thought Maple Flow would do all that for me in the first instane above...

Thanks for any help.

 

 suppose i have outputs of several functions retured as variables float

A , B , C , D ,E , F , G , H , I , J , K ,L,M ,N , O, P,Q

I run the functions several times that all the function are run even if one is run 

so for each run I get a row of the matrix M in that order how to create from that outputs

each output is appended as next row in the same way to the matrix in the same order

Then I want the final matrix after all run to me exported to excel

I have downloaded Maple and install the trial version , i entered the Purchase code  and every thing was done, I did not get any errors , however, while i am trying to open Maple, when I open the software , I see this window which i have uploaded below , and when i click on Active i eneter my purchase code again , and it says it has acitivated and then when i click ok , it exit , what is the issue ?

can you help me ?

Hi.

1- I want to solve the following equation:
eq:=diff(theta(t),t)=-(A[1]*Dirac(t-T[1])+A[2]*Dirac(t-T[2]));

with the boundary conditions:

bcon := theta(0)=-v[1],theta(1)=v[3]:

but the code

dsolve({eq,bcon},theta(t)) assuming T[1]<T[2];
and also

dsolve({eq,bcon},theta(t), method=laplace) assuming T[1]<T[2];

do not work. 

The solution must be:

theta(t)=piecewise(0 <= t and t < T[1], -v[1], T[1] < t and t < T[2], 0, T[2] < t and t <= 1, v[3]);

2-Furthemore, solving the ode:

restart;
eq2 := diff(phi(t),t)=piecewise(0 <= t and t < T[1], -v[1], T[1] < t and t < T[2], 0, T[2] < t and t <= 1, v[3]);

with the similar bc:

bcon2 := phi(0)=-v[2],phi(1)=v[4];

is another problem which I am trying to solve it. but again the code

dsolve({eq2,bcon2},phi(t)) assuming T[1]<T[2];

does not work!! while the solution must be:

phi(t)=piecewise(0 <= t and t < T[1], v[1]*(t-T[1]), T[1] < t and t < T[2], 0, T[2] < t and t <= 1, v[3]*(t-T[2]));

Could you please help me to solve these two problems??

I really appreciate any help you can provide.

 

Write a recursive procedure proc2 with option remember, to compute the function 
                             "f[n]"

 recursively defined by 
                           "f[0] = 0"

,   
                        "f[1] = -7*x^2"

,  
       "f[n] = -3*f[n - 2]^2 + (n + 21)*cos(2*f[n - 1])"

  for n>1.
Evaluate the first derivative of 
f[18];
 at  "x = 2*Pi"

 numerically by the two procedures, and compare running times.

Okay, so for this problem, here is what I have:

>proc2:=proc(n)
option remember;
if n=0 then 0
elif n=1 then -7*x^2;
elif n>1 then -3*f^2[n-2]+(n+21)*cos(2*f[n-1]);
end if;
end proc:

>proc2(18)

and I get this as my result: -3*f^2[16] + 39*cos(2*f[17])

which is true but what can I do to let the proc2 solve it all the way til they get n=0 or 1? 

and how can I plug in 2*pi in to x?

Please help! Thank you so much for your time!

 Let a matrix be like below

[[0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
  0. 0. 0. 0. 0.]
 [1. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
  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 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
  0. 0. 1. 0. 1. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
  0. 0. 0. 1. 0. 1. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
  0. 0. 0. 0. 1. 0. 1.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
  0. 0. 0. 0. 0. 1. 0.]]

 

in some places we may have ". " or we have a "\n" or newline after "." we need to convert it to a regular adjacency matrix which can be recogonized by the graph function of maple

Is their anyway we can get the smiles file of given IUPAC name 

Smiles with explicit hydrogen

And draw its chemical graph 

Hi seniors, I have solved some questions of derivative, intgration and limits by using built in command. I am interested to you show full step of each questions. Could any one plase help  me in this regards

Help_derivative_and_limit.mw

This is the problem: My object is getting large with many private methods.

In non-OOP setup, I could make different modules A,B,C and put relevent methods inside each module.

Now I find I can not do this inside the object. All methods have to be flat and at same level. So I lose the benefit of using different name space for different methods.

It will be easier to explain with a simple example. Lets say I have this now

restart;

A:=module() 
    option object; 
    local name::string:="";  

    export ModuleCopy::static:= proc( self, proto, name::string, $)          
         self:-name := name;
    end proc;

    export process_1::static:=proc(_self,$)
       _self:-process_2();
    end proc;

    local process_2::static:=proc(_self,$)
       print("in process_2 ",_self:-name);
    end proc;

end module; 

The above works by having all methods at same level. I can now do 

o:=Object(A,"me");
o:-process_1()

                  "in process_2 ", "me"

But now as the number of private methods increases I want to put a name space around collection of these for better orgnization, but keep all methods logically as part of the object as before.

I change the above to be

restart;

A:=module() 
    option object; 
    local name::string:="";  

    export ModuleCopy::static:= proc( self, proto, name::string, $)          
         self:-name := name;
    end proc;

    export process_1::static:=proc(_self,$)
       o:-B:-process_2();
    end proc;
    
    #method process_2 is now inside a module. 
    local B::static:=module()
       export process_2::static:=proc(_self,$)
           print("in B:-process_2 ",_self:-name);
       end proc;
    end module;

end module; 

Now

o:=Object(A,"me");
o:-process_1()

Gives an error

Error, (in unknown) invalid input: process_2 uses a 1st argument, _self, which is missing

I tried many different combinations, but nothing works.

So right now I have all methods flat. All at same level. But I do not like this setup. Since I lose the nice modular orgnization I had with using different modules with different methods inside different modules.  

Is there a way to have a module inside an object and call its methods from inside the object as if these method were part of the object private method with only differece is adding the module name in between?

So instead of _self:-foo()  I just change it to  _self:-B:-foo() and have both behave the same way?

In C++, one can use what is called a friend class to do this. 

First 182 183 184 185 186 187 188 Last Page 184 of 2308