Maple Questions and Posts

These are Posts and Questions associated with the product, Maple


I have maple code saved as a text file f.txt.

It resides here


what is the most expedient way to convert to f.mpl ?

Is there any easy way to use logical "operatives"(not sure what they are called)?


e.g., x^2[x=3] = if x = 3 then 3^2 or 0

f(x)[g(x)=x^2] = f(x) when g(x)=x^2

or whatever. I don't care about the syntax but would like it to be short and distinct. There are obviously ways to get the same behavior but they are too verbose. I like the bracket syntax but I doubt maple works with it. It could be done with a binary operator that does the comparison and returns if true...


But curious if maple has such a thing built in?

Maple gave Lie algebras of a system of PDE in which some of them do not leave the system invariant. Dont know whether the mistake is maple's or mine. File attached.


I have an arc length parametrization problem. I got the right answer for the speed. The lines of code before the long dividing line I successfully got to work. The main problem I am having is with the code underneath that. It is producing weird answers and just returning the same words without computing any mathematical calculation.




T:= 4:

r := t -> <t^2 + t, sin(t^2)*(t + 1), cos(t^2)*(t + 1)>;

speed := Norm(diff(r(t), t));

evalf(Int(speed, t = 0 .. T)); (I got 62.98633182 for this part)

----------------------------This is where I started running into problems with the arc length parametrization.

L := b -> int(speed, t = 0 .. b);

speed := t -> subs(c = t, Norm(diff(r(c), c)));

speed2 := t -> sqrt(factor(simplify(speed(t)^2)));

solve(s = L(t), s);

assume(b > 0 'real');

g := s -> solve(s = L(b), b, useassumptions = true);

newr := s -> r(g(s));



I like to see this solution step by step. I used DiffTutor before, is there something similar for implicit differentials?

I want to find dz:

z*t = cos(z + t)


I am trying to enter an ODE into Maple and I remember that Dr. Lopez showed how to use a prime to denote differentiation. When I try I get conflicting results: if I type

>  y''+y'+3*y=0;;

Error, unexpected single forward quote
But if I copy that command from the Help page Maple understands what I want. What is going on?

BTW, there is no entry for Differential Equations on the Help page.



In Maple outputs, long fraction bars occur quite frequently. A common example is of the type A(x)/x, where A(x) may be a complicated expression made up by standard functions, derivatives, integrals etc. in terms of x and some constants, denoted by names. Maple displays such an expression in terms of a long solidus and x as the denominator. This looks rather weird. A preferable display would be of the form x^-1 A(x) or A(x) multiplied by 1/x. I have unsuccessfully tried to achieve this but failed. Can this be done?







Warning, The imaginary unit, I, has been renamed _I


M__h := .50; 1; beta[o] := 0.34e-1; 1; beta[1] := 0.25e-1; 1; mu[r] := 0.4e-3; 1; sigma := .7902; 1; alpha := .11; 1; psi := 0.136e-3; 1; xi := 0.5e-1; 1; gamma := .7; 1; M__c := .636; 1; mu[b] := 0.5e-2; 1; `&varpi;` := .134

























B(0) := .50;















ODEs := {diff(J[1](T), T) = M__h-beta[1]*psi*(J[1](T)+J[2](T))*J[7](T)-sigma*psi*beta[1]*J[4](T)*J[7](T)-mu[r]*J[1](T), diff(J[2](T), T) = beta[1]*psi*(J[1](T)+J[2](T))*J[7](T)-(alpha+xi+mu[r])*J[2](T), diff(J[3](T), T) = alpha*J[2](T)-(`&varpi;`+mu[r])*J[3](T), diff(J[4](T), T) = `&varpi;`*J[3](T)-(gamma+mu[r])*J[4](T), diff(J[5](T), T) = gamma*J[4](T)+sigma*psi*beta[1]*J[5](T)*J[7](T)-mu[r]*J[5](T), diff(J[6](T), T) = M__c-psi*beta[o]*J[6](T)*J[3](T)-mu[b]*J[6](T), diff(J[7](T), T) = psi*beta[o]*J[6](T)*J[3](T)-mu[b]*J[7](T)}

{diff(J[1](T), T) = .50-0.3400e-5*(J[1](T)+J[2](T))*J[7](T)-0.26866800e-5*J[4](T)*J[7](T)-0.4e-3*J[1](T), diff(J[2](T), T) = 0.3400e-5*(J[1](T)+J[2](T))*J[7](T)-.1604*J[2](T), diff(J[3](T), T) = .11*J[2](T)-.1344*J[3](T), diff(J[4](T), T) = .134*J[3](T)-.7004*J[4](T), diff(J[5](T), T) = .7*J[4](T)+0.26866800e-5*J[5](T)*J[7](T)-0.4e-3*J[5](T), diff(J[6](T), T) = .636-0.4624e-5*J[6](T)*J[3](T)-0.5e-2*J[6](T), diff(J[7](T), T) = 0.4624e-5*J[6](T)*J[3](T)-0.5e-2*J[7](T)}


ic1 := {J[1](0) = B(0), J[2](0) = C(0), J[3](0) = DD(0), J[4](0) = E(0), J[5](0) = F(0), J[6](0) = G(0), J[7](0) = H(0)};

{J[1](0) = .50, J[2](0) = .30, J[3](0) = .21, J[4](0) = .14, J[5](0) = .70, J[6](0) = .45, J[7](0) = .14}


sol1 := dsolve(`union`(ODEs, ic1), {J[1](T), J[2](T), J[3](T), J[4](T), J[5](T), J[6](T), J[7](T)}, type = numeric, output = listprocedure)