jakubi

1369 Reputation

12 Badges

19 years, 333 days

MaplePrimes Activity


These are answers submitted by jakubi

seems similar to this one.

in this sense:

R:=RealRange(2,5) union RealRange(3,6);
             R := RealRange(2, 5)  union  RealRange(3, 6)

is(1 in R);
                                false
is(2 in R);
                                 true
is(6 in R);
                                 true

you can apply Maple commands during the calculations or later. Eg, for the Ricci scalar (omitting initial steps) you can apply 'simplify' along the calculation steps, expand in powers of omega, and then display:

grcalcalter(Ricciscalar,simplify);
grmap(Ricciscalar,series,'x',omega,3);
grdisplay(_):

 

I have eg a file J:\temp\maple\q.txt with these lines:

1+1;
f:=proc(x)
x^2;
end proc;

f(a);

and both

read "j:/temp/maple/q.txt";

or

read `j:/temp/maple/q.txt`;

produce this output:

                                  2
                      f := proc(x) x^2 end proc
                                   2
                                  a

As an alternative, eg if I have a txt file with prompts, J:\temp\maple\q2.txt say, with lines:

> 1+1;
> f:=proc(x)
> x^2;
> end proc;
>
> f(a);

I can do, from the Classic GUI menu, File > Open > Type: Maple Text , select q2.txt , Text Format Choice > Maple Text, and a worksheet q2.txt opens with the above lines.

In Standard GUI, similarly, File > Open > Files of type: Text (.txt), select q2.txt, Open > Maple Text (in Text Format Choice).

Alternatively, in Standard GUI, File > Open > Files of type: Text (.txt), select q.txt, Open > Maple Input (in Text Format Choice), and I get a worksheet q.txt with those same input lines (ie from a txt file without ">"s).

In Classic GUI:  Help > Save to Database

In Standard GUI: Tools > Help Database > Save as Help Page

Set 'infolevel':

infolevel[pdsolve]:=3:

and you get information on what it does and fail:


pdsolve(6*cos(theta)^2*C^2*(diff(f(theta, `ϕ`), 
`ϕ`))^2*c^2+A^2*omega^2*cos(theta)^4+
6*cos(theta)^2*C^2*(diff(f(theta, `ϕ`), theta, theta))
*(diff(f(theta, `ϕ`), `ϕ`, `ϕ`))*c^2+
A^2*omega^2-2*A^2*omega^2*cos(theta)^2+6*C^2*
(diff(f(theta, `ϕ`), theta, `ϕ`))^2*
c^2-6*cos(theta)^2*C^2*(diff(f(theta, `ϕ`), 
theta, `ϕ`))^2*c^2-12*C^2*(diff(f(theta, `ϕ`), 
theta, `ϕ`))*cos(theta)*sin(theta)*
(diff(f(theta, `ϕ`), `ϕ`))*c^2-12*cos(theta)^2
*C^2*(diff(f(theta, `ϕ`), theta))^2*c^2+
6*cos(theta)^4*C^2*(diff(f(theta, `ϕ`), theta))^2*c^2+
6*C^2*(diff(f(theta, `ϕ`), theta))^2*c^2+
6*C^2*(diff(f(theta, `ϕ`), theta, theta))*cos(theta)^3*
(diff(f(theta, `ϕ`), theta))*sin(theta)*c^2-6*C^2*
(diff(f(theta, `ϕ`), theta, theta))*cos(theta)*
(diff(f(theta, `ϕ`), theta))*sin(theta)*c^2-6*C^2*
(diff(f(theta, `ϕ`), theta, theta))*
(diff(f(theta, `ϕ`), `ϕ`, `ϕ`))*c^2=0,
f(theta, `ϕ`));

First set of solution methods (general or quase general solution)
Trying methods for PDEs "missing the dependent variable" ...
Second set of solution methods (complete solutions)
Trying methods for second order PDEs
Third set of solution methods (simple HINTs for separating variables)
Fourth set of solution methods
Preparing a solution HINT ...
Trying HINT = _F1(theta)+_F2(\`ϕ\`)+_F1(theta)*_F2(\`ϕ\`)
Trying travelling wave solutions as power series in tanh ...
Trying travelling wave solutions as power series in ln ...

May be that you can guess a better hint.

is available already in Maple 11.02:

with(HTTP);
 [Code, Get, Post, URLDecode, URLEncode, URLParse]

But undocumented in Maple 12...

From ?HTTP,Get in Maple 11.02:

HTTP[Get]
Calling Sequence
Get (uri, headers)
Parameters
uri - host, port, and url path of the form http://host:port/path/to/file?query
headers - (optional) list of header values; duplicate values are combined into a single comma-separated list
Returns
Get returns a tupe (code, headers, content) with code set to the return code sent by the server, headers as a table, and content containing the body of the server response.

Integration from t=0 to 1 gives (x,y) as a function of the parameters F(a,b,...,n) say.
One posibility is try to minimize a scalar function like (x-0.9)^2+(y-0.8)^2, which is another function of the parameters, G(a,b,...,n). Ie, the points in the parameter space where G=0 are the solutions to your problem.

It would be convenient to eliminate (ie fix) as much parameters as possible to reduce the dimension of the parameter space.

But for nonlinear differential equations the dependence of the solutions on the parameters may be tricky (eg lect. 33 here deals with something simpler but close to your case)

One posibility is writing the Abel's invariant. After ?odeadvisor,Abel:
If the invariant does not depend on the independent variable, then the equation can be solved directly.

 

If F(x,y) is a first integral of the system (d/dt)(x,y)=f(x,y)=(x+y,4*x+y), ie dF/dt=0, then its gradient is orthogonal to f(x,y):

eq1:=diff(F(x,y),x)=-(4*x+y)*mu(x,y);
eq2:=diff(F(x,y),y)=(x+y)*mu(x,y);
where the proportionality factor mu(x,y) is an integrating factor:
pdsolve({eq1,eq2});
{F(x,y) = _F1(1/((y-2*x)^3*(y+2*x))), mu(x,y) = -4*D(_F1)(1/((y-2*x)^3*(y+2*x)))/(-y+2*x)^4/(y+2*x)^2} Then, using Alec's choice for the arbitrary function:
eval(%,_F1=(a->1/a));
simplify(%);

{F(x,y) = -(-y+2*x)^3*(y+2*x), mu(x,y) = 4*(-y+2*x)^2}
we recover the previous result.

I have thought that 'eval' calls are, in general, slower than 'subs' calls because of the additional calls that it makes. I mean eg the paragraph

The eval command knows how to correctly evaluate derivatives, integrals, piecewise function definitions, etc. whereas the subs command in comparison makes substitutions which may not make sense mathematically. If there are symbolic dependencies between the expression and the point at which it should be evaluated that are considered ``unsafe'', eval will return unevaluated. This knowledge is coded in the Maple library in the Maple procedures `eval/diff`, `eval/int`, `eval/piecewise`, etc....

in ?eval, and cases like

eval(sin(x),x=0);
                                  0
subs(x=0,sin(x));
                                sin(0)

where 'eval' is calling a table of remembered values.

can be done like this:

with(Student[LinearAlgebra]):
M1 := <<1,1/3>|<1/2,-1/2>>:
ApplyLinearTransformPlot( M1, output = animation);

In fact Maple has already an equivalent functionality for integrals.

H:=u(c(t))+lambda(t)*(f(k)-c(t)-delta*k); 
op(VariationalCalculus:-EulerLagrange( H, t, c(t))):
C:=isolate(%,lambda)(t);
Ct:=diff(%,t);
zip((a,b)->a/b,convert(Ct,list),convert(C,list)):
op(1,%)=op(2,%);

                      H := u(c(t))+lambda(t)*(f(k)-c(t)-delta*k)

                      C := lambda(t) = D(u)(c(t))

                                d                (2)           /d      \
                          Ct := -- lambda(t) = (D   )(u)(c(t)) |-- c(t)|
                                dt                             \dt     /
                             d                (2)           /d      \
                             -- lambda(t)   (D   )(u)(c(t)) |-- c(t)|
                             dt                             \dt     /
                             ------------ = -------------------------
                              lambda(t)            D(u)(c(t))

RootFinding:-Analytic( BesselJ(0, x), x, -I..10+I ):
sort([%]);
               [2.404825558, 5.520078110, 8.653727915]
First 17 18 19 20 21 22 23 Page 19 of 24