Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

 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!

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. 

Please I will like to know if there exists any command to isolate the known regular mathematical functions from an expression. For example, given the equation 

I need a means of isolating (ex & sin(v)) from the above expression

Thanks

How to get a plot where a unit cube [0,1]X[0,1]X[0,1] in R^3 is intersected by a plane $x+z=1$. Please give me a code

 

where p, q, r, a are positive constants and phi(0) be a initial condition

I'm not sure if this can even be done, but if it's possible, how do I do it:

I have a python script called "Blue.py", the path should simply be "Blue.py", since my worksheet and the python script are saved in the same place.

I want to somehow import two arrays and an equation from maple to said python script, use them in a procedure there, and then import the output of said procedure, a 2d array, backwards to maple.

I don't really care what format the equation and the arrays take in python (the current version assumes types "np.array" for the arrays and type procedure for the equation, but I can always adjust it), but the type of the output of Blue.py should be of the form 2d Array (for example [[0,1],[8,-2],[3,3]] ).

Is it possible to shuffle input between maple worksheets and python scripts like that, and if so, how? 

The uploaded worksheet is a failed attempt at this proof.

Please either refer me to or show me a valid proof.

  *** I have tried to upload my worksheet using the green arrow but the insert link operation of the upload failed ***

cc

loading

Error occurred during PDF generation. Please refresh the page and try again

int(int(x^(alpha + 1)*y^(beta + 1)*exp(-(x^2 + y^2)/(4*Pi))/sqrt(x^2 + y^2), x = -R .. R), y = -R..R) assuming x>0, y>0, R>0;

I am trying to evaluate the above symbolic integral but Maple returns the same input in Symbolic form without evaluating it at all. Is there something wrong with my approach?

This is another bizzar behaviour of objects. I created a basic object of type person.  Noticed that after issuing the call copy(object,deep) and not doing anything at all with the result. Just made the call only, then I am not longer able to create new objects of this class. I had to restart the session to be able to create new objects again.

Why?  This seems like something went messy with memory layout. I put a print message in the constructor, and see that this message no longer show up  after the call copy(object,deep) even though this call was not used for any purpose as you see, but to only to see its effect on the session.

Any explanation why one can no longer create new objects after doing this?  Here is the workseet


 

interface(version)

`Standard Worksheet Interface, Maple 2022.1, Windows 10, May 26 2022 Build ID 1619613`

restart;

person:=module()
    option object;
    export name::string:="";  

    export ModuleCopy::static:=proc(_self,proto, name::string, $)
      print("Enter constructor of person");
      _self:-name := name;
    end proc;
end module;

_m2370471750336

p1:=Object(person,"me");
p1:-name;
do_not_care := copy(p1,deep);  

"Enter constructor of person"

_m2370557462816

"me"

_m2370557440576

p2:=Object(person,"me");  #WHy constructor no long called?
p2:-name;   #this no longer work.

_m2370556941056

""

p3:=Object(person,"me");  #WHy constructor no long called?
p3:-name;   #this no longer work.

_m2370556932032

""

restart;  #had to call restart to fix things.

person:=module()
    option object;
    export name::string:="";  

    export ModuleCopy::static:=proc(_self,proto, name::string, $)
      print("Enter constructor of person");
      _self:-name := name;
    end proc;
end module;

_m2370471750336

p4:=Object(person,"me");  #now it works again
p4:-name;   

"Enter constructor of person"

_m2370557462816

"me"

 


 

Download deep_call_problem.mw

First 180 181 182 183 184 185 186 Last Page 182 of 2097