MaplePrimes Questions

How do I plot the complex function |z+1||z-1|=1 in Maple? I know there is complexplot but don't quite understand how to use it.

I'm trying to readin a XML file, where some figures are attached a unit.

Here's part of the XML file.

When doing the readin and assigning the values to  a variable with AttributeValue, the type of the variable is a string.

How can I convert this string value ("10.*Units:-Unit(m)") to a number attached the defined units?

hello,

My equations are not getting solved.

Please tell me, is there any other command to solve these type of equations.

Q1.mw

 

 

Hi,

How to keep fractions and parentheses in the expression, and not calculate the product ?

Thanks

QuestionFraction.mw

For example this fraction?

 

Why Maple gives different looking solution when calling  

dsolve(sys);

vs.

dsolve(sys,deps);

? Both solution are actually correct. But look different.  Here is an example

restart;
sys:=[
diff(x(t),t) = 2*x(t)-z(t), 
diff(y(t),t) = 2*y(t)+z(t), 
diff(z(t),t)=2*z(t),
diff(w(t),t)=-z(t)+2*w(t)];
deps:=[x(t),y(t),z(t),w(t)];

dsolve(sys);

dsolve(sys,deps);

Notice the difference:

In first case, the x(t) and y(t) solutions have 2 constants of integrations, and in the second case, they have 3 constants of integration.

If we solve this using the matrix exponential method, the solution comes out to match the first one:

A:=Matrix([[2,0,-1,0],[0,2,1,0],[0,0,2,0],[0,0,-1,2]]):
sol:=Vector([x(t),y(t),z(t),w(t)])=LinearAlgebra:-MatrixExponential(A,t).Vector([_C1,_C2,_C3,_C4]);
simplify(sol)

Again, both solution verify to 0, using odetest, and I assume now it is correct (have no reason to think odetest is not correct).

But I'd like to understand more why when passing the unknowns to dsolve, the solution comes out different looking (3 constants of integrations, vs. two in this case). Should the solution be the same looking in both cases? 

This came out, since I thought my solution was wrong, since it did not look like Maple's. 

 

Maple 2020.1

 

In a recent question, the solution involved [...]::[list$3].

H:= proc(n, x, y)
    if n=0 then y+1
    elif n=1 and y=0 then x
    elif n=2 and y=0 then 0
    elif y=0 then 1
    elif not [n,x,y]::[nonnegint$3] then 
        'procname'(n-1, x, 'procname'(n, x, y-1))
    else
        thisproc(n-1, x, thisproc(n, x, y-1))
    fi
end proc

Where is  the  form [...]::[list$3] documented?

 

 

Please refer to this for the definition(s):

http://www.mrob.com/pub/math/largenum-3.html#hyper

The hy(a,n,b) recursion turns  into the following Maple code:

 

Unfortunately this code depends on x and y being explicit numeric values (x,y \in N), otherwise the recursion crashes (if I ask for example H(2,x,y) or H(2, x, 2))

Is there any way to transform the code so that the final construct can be shown symbolically?

I don't see anything obvious, especially since if y is not a specific natural number the recursion will crash. Can we maybe force Maple to not evaluate it for natural number arguments and return the final construct as either a sum, product or tower of the symbols for x and y (i.e. symbols of the digits of x and y like a tower of 2's 3's, etc)?

I do remember something about putting primes around functions prevents premature evaluation, but in this case it doesn't do anything like I'd want. This definition is not primitive recursive (like that of the Ackerman function), so I don't expect it to be able to be called abstractly (H(2,x,y) or something else such), but maybe we can turn it into something that shows the structure of the final construct as symbols of the digits of x and y?

Thanks.

Yannis

PS: One can improve the situation a bit, by implementing the extended definition as:

hy := proc (n, x, y) if n = 0 then y+1 elif n = 1 then x+y else if y = 1 then x else if n = 2 then x*y elif n = 3 then x^y elif n = 4 then x^hy(4, x, y-1) else hy(n-1, x, hy(n, x, y-1)) end if end if end if end proc

(which can be called abstractly for n=0,1,2,3,4 (hy(n,x,m) for natural m), but for higher n it crashes similar to H, since the definition falls back to the previous if n>4.

How to use spacecurve with two variables and how to use display? 

Thanks!!

I want to make a procedure that takes a function as an input, but everything I've tried has turned the function into a string.
This is what I want to do.

newtons := proc( f::function, x, n::integer)

But when I try and use the the function f that I defined, it just gets treated like a string or something. I can't put variables into it, I cant evaluate anything from it.

How do I get proc to see f as a function?

There are some answers up here, but they are for given known functions.
I need to place parentheses around functions that are automatically created.
For example, the function $f(x)$ takes many polynomial values during the execution
of a procedure. For examplle, it takes the values, 2x-1, x^2+3x+2, x^3-2x-3, etc.
How do I automatically place parentheses around these polynomials?
Thank you!
mapleatha

Hello, 
I have this problem to my system:

sol := pdsolve(sys2, {bcs, ics}, numeric)
sol:-plot3d(u1(x, t), x = 2 .. 3.2, t = 100 .. 1000)
Error, (in pdsolve/numeric/plot3d) unable to compute solution for t>HFloat(0.0):
unable to store HFloat(undefined)+HFloat(undefined)*I when datatype=float[8]

It is 1 pde and 1 ode.

What can I do to solve it?


Best
 

Dear Maple community,

I am trying to solve a system of linear equations, each of which is homogenous of degree 1 (i.e., defined up to a scale/constant factor), and was wondering whether one can use Maple to solve for ratios of variables (defined relative to a numeraire). An example of my problem is attached (Example.mw). More specifically:

- Equation (1) defines the system,

- Equations (2) through (4) exemplify the system for J=3 and S=1 (creating the system of 3 equations in 3 unknowns: {dlog R[1,1], dlog R[2,1], dlog R[3,1]},

- Function A solves this system for the unknowns and the subsequent commands simplify dlog R[1,1] (and dlog R[2,1]) using the model's constraints (side relations). Not surprizingly, I get the error message "Error, (in simplify/siderels:-Recurse) indeterminate expression of the form 0/0", which results from the fact that the system is homogenous of degree 1 (and, hence, each dlog R is defined only up to a scale),

- However, in principle, it should be possible to choose one of the dlog R's, say, dlog R[1,1] as a numeraire and express the other two "unknowns" (dlog R[2,1], and dlog R[3,1]), relative to it, in order to ultimately solve this system for dlog R[2,1]/dlog R[1,1] and dlog R[3,1]/dlog R[1,1] as functions of exogenous variables only.

I'd appreciate any advice how I can use Maple to tackle this problem. Thank you very much in advance!

 

Hi all,

There is issue with saving big numbers to txt file on WIndows

Please look at the file:

txt_issue.mw

Function save just cutting a big number.

Thank you.

Hi, Maple seems to automatically sort my list in some numerical order. Is there a way to overcome this? I want my list as it is.

 

First 493 494 495 496 497 498 499 Last Page 495 of 2427