Carl Love

Carl Love

28025 Reputation

25 Badges

12 years, 306 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

Just guessing here based on very limited information: My best guess is that the variable n has not been set. It must have a numeric value for the above code to work. Please post (upload) your entire worksheet.

You just need plot(f(x)-g(x), x= 0..1).

I am using the OP's intended definition of phi, as described in the first comment above.

omega:= z-> 2*<Re(z), Im(z), 1>/(1+abs(z)^2):

phi := z-> (l*z+a)/(1-l*conjugate(a)*z):

First, you need to use the exponential function as exp(x) rather than e^x; the symbol e hasno predefined meaning in Maple input, although it does appear in output.

Second, you need to make some assumptions in order for Maple to be able to simplify the expressions, especially the derivatives, and for Maple to be able compute the limits. The following assumptions seemed reasonable to me; they are not necessarily all needed. (Note that evalc automatically assumes that all variables are real.)

assume(-Pi < theta, theta <= Pi, xi::real, eta::real, l::real, r > 0);
f:= evalc(eval(omega(phi(z)), [z= r*exp(I*theta), a= xi+I*eta]));
fr:= simplify(map(diff, f, r));
map(limit, r^2*fr, r= infinity);

... lengthy expressions omitted, but here are the limits:

You asked:

Is it possible to generate a list of values for a function in the form of an ordered pair, like a cartesian plane, i.e. ( x, f(x) )? And how can I plot a graph with this output?

One of the easiest ways to generate the list of ordered pairs is to use plot and extract the point data from the plot. Like this

plot(f(x), x= -1..1);

... plot appears here ...

L:= convert(op([1,1], %), listlist);

... list of points appears here.

You can use op to extract the operands. The odd-numbered operands are the conditions, and the even-numbered operands are the "pieces". For example,

op(3, f);

op(4, f);

 2

op(6, f);

The following produces a list of equations of the coefficients all equated to 0.

[coeffs(collect(lhs(EQ), a), a)] =~ 0;

The preliminary collect step may be superfluous in this case but would be required for some more-complicated polynomials.

The normal is not a keyword in the command collect(a, x, normal). Rather, it is the simplifier procedure. See ?normal. It is a form a simplification not as intense as that provided by simplify.

If I cut-and-paste your two columns of data directly into a worksheet, it automatically becomes a 7x2 Matrix. To convert a Matrix M into the form that you seem to want, use convert(M, listlist).

The matrix M1 is equal to [[1,x], [1,x]] (i.e., two identical rows). Hence it is singular and cannot be inverted.

You should change GenerateMatrix to LinearAlgebra:-GenerateMatrix. (Not that that will fix the singular matrix.)

series, rhs,and convert(..., polynom) are all built-in commands.

Use two sets of unevaluation quotes around each Intat in the rule like this:

ToSumInt:=
     ''Intat''(
           A::algebraic*Sum(v::algebraic,r::{name,equation})*
           B::algebraic,u::equation
     )= Sum(''Intat''(A*v*B,u),r)
:
J:= Intat(f(xi)*Sum(g(n*xi), n), xi= x);

applyrule(ToSumInt, J);

Note that MaplePrimes makes two single quotes look like a double quote.

Regarding your second problem, please post plaintext of the expression that useInt does not work on.

I think that you'd like a simple algebraic function f of (i,j) such that u[i,j] = Sol[f(i,j)] for all relevant i and j. The following will work regardless of how complicated the order of the entries in Sol is.

UtoSol:= table((`[]`@op)~(Sol) =~ [$1..nops(Sol)]):
Sol_idx:= (i,j)-> UtoSol[[i,j]]:

For example,

Sol_idx(1,1);

                             9

Sol[Sol_idx(1,1)];

 

 

You are missing a multiplication sign between the two polynomials in parentheses.

Here is another way to do a polar plot of a numeric dsolve solution:

Sol:= dsolve({diff(r(t),t)=cos(t), r(0)=0}, r(t), numeric):
plots:-changecoords(
     plots:-odeplot(Sol, [r(t),t], axiscoordinates= polar),
     polar
);

Note that the coordinates must be ordered (r, theta), not (theta, r).

The answer to this is very similar to the answer to your last question. If you use assumptions and simplify the dsolve results with evalc, then those results will simplify dramatically. Then you can check directly that they satisfy the ODEs. (I am not saying that there's anything wrong with odetest or Mehdi's Answer; I am showing that Maple can work well with imaginary values.)

restart:
assume(a > 0, -Pi < m, m <= Pi);
sys_ode:=
     diff(d11(m),m) =
           -(3*sin(m)^2-1)*d31(m)/a^(3/2)+(-3*cos(m)*sin(m)/a^(3/2))*d41(m),
     diff(d21(m),m) =
          (-3*cos(m)*sin(m)/a^(3/2))*d31(m)-(3*cos(m)^2-1)*d41(m)/a^(3/2),
     diff(d31(m),m) = -a^(3/2)*d11(m),
     diff(d41(m), m) = -a^(3/2)*d21(m)
:
Sol1:= dsolve({sys_ode}):
Sol2:= simplify(evalc(Sol1));

Now verify that these solutions satisfy the original system of ODEs:

simplify((lhs-rhs)~(eval({sys_ode}, Sol2)));

First 306 307 308 309 310 311 312 Last Page 308 of 395