dharr

Dr. David Harrington

8200 Reputation

22 Badges

20 years, 335 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are answers submitted by dharr

The problem is that your function CP can't take T1(t) as an argument since that is not what CoolProp wants. But dsolve will complain if you don't have it. So you can make the procedure just return unevaluated if given a symbolic input to keep dsolve happy, but pass a numeric value to CoolProp. See attached.

Download Coolprop.mw

restart

with(PDEtools); _local(gamma)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

declare(phi(x, t)); declare(psi(x, t))

phi(x, t)*`will now be displayed as`*phi

psi(x, t)*`will now be displayed as`*psi

pde := diff(phi(x, t), t)+diff(phi(x, t), x)+(3/2)*phi(x, t)*(diff(phi(x, t), x, t))-(3/2)*(diff(phi(x, t), x))*(diff(phi(x, t), t))+(1/2)*phi(x, t)^2*(diff(phi(x, t), t))

diff(phi(x, t), t)+diff(phi(x, t), x)+(3/2)*phi(x, t)*(diff(diff(phi(x, t), t), x))-(3/2)*(diff(phi(x, t), x))*(diff(phi(x, t), t))+(1/2)*phi(x, t)^2*(diff(phi(x, t), t))

eq2 := phi(x, t) = 3*(diff(ln(psi(x, t)), x))

phi(x, t) = 3*(diff(psi(x, t), x))/psi(x, t)

eq3 := (1/3)*numer(normal(eval(pde, eq2)))

2*(diff(diff(psi(x, t), t), x))*psi(x, t)-9*(diff(diff(psi(x, t), t), x))*(diff(diff(psi(x, t), x), x))+2*(diff(diff(psi(x, t), x), x))*psi(x, t)-2*(diff(psi(x, t), x))^2-2*(diff(psi(x, t), x))*(diff(psi(x, t), t))+9*(diff(psi(x, t), x))*(diff(diff(diff(psi(x, t), t), x), x))

I'm following the notation in the paper - there were missing multiplications in this line

eq4 := psi(x, t) = gamma[1]*cos(theta[0]*(t*omega[0]+x))+gamma[2]*exp(theta[1]*(t*epsilon[0]+x))+exp(-theta[1]*(t*epsilon[0]+x))

psi(x, t) = gamma[1]*cos(theta[0]*(t*omega[0]+x))+gamma[2]*exp(theta[1]*(t*epsilon[0]+x))+exp(-theta[1]*(t*epsilon[0]+x))

After the following substitution, we are supposed to find 5 equations from the coefficients, i.e., independent of x and t.

eq5a := eval(eq3, eq4)

2*(-gamma[1]*theta[0]^2*omega[0]*cos(theta[0]*(t*omega[0]+x))+gamma[2]*theta[1]^2*epsilon[0]*exp(theta[1]*(t*epsilon[0]+x))+theta[1]^2*epsilon[0]*exp(-theta[1]*(t*epsilon[0]+x)))*(gamma[1]*cos(theta[0]*(t*omega[0]+x))+gamma[2]*exp(theta[1]*(t*epsilon[0]+x))+exp(-theta[1]*(t*epsilon[0]+x)))-9*(-gamma[1]*theta[0]^2*omega[0]*cos(theta[0]*(t*omega[0]+x))+gamma[2]*theta[1]^2*epsilon[0]*exp(theta[1]*(t*epsilon[0]+x))+theta[1]^2*epsilon[0]*exp(-theta[1]*(t*epsilon[0]+x)))*(-gamma[1]*theta[0]^2*cos(theta[0]*(t*omega[0]+x))+gamma[2]*theta[1]^2*exp(theta[1]*(t*epsilon[0]+x))+theta[1]^2*exp(-theta[1]*(t*epsilon[0]+x)))+2*(-gamma[1]*theta[0]^2*cos(theta[0]*(t*omega[0]+x))+gamma[2]*theta[1]^2*exp(theta[1]*(t*epsilon[0]+x))+theta[1]^2*exp(-theta[1]*(t*epsilon[0]+x)))*(gamma[1]*cos(theta[0]*(t*omega[0]+x))+gamma[2]*exp(theta[1]*(t*epsilon[0]+x))+exp(-theta[1]*(t*epsilon[0]+x)))-2*(-gamma[1]*theta[0]*sin(theta[0]*(t*omega[0]+x))+gamma[2]*theta[1]*exp(theta[1]*(t*epsilon[0]+x))-theta[1]*exp(-theta[1]*(t*epsilon[0]+x)))^2-2*(-gamma[1]*theta[0]*sin(theta[0]*(t*omega[0]+x))+gamma[2]*theta[1]*exp(theta[1]*(t*epsilon[0]+x))-theta[1]*exp(-theta[1]*(t*epsilon[0]+x)))*(-gamma[1]*theta[0]*omega[0]*sin(theta[0]*(t*omega[0]+x))+gamma[2]*theta[1]*epsilon[0]*exp(theta[1]*(t*epsilon[0]+x))-theta[1]*epsilon[0]*exp(-theta[1]*(t*epsilon[0]+x)))+9*(-gamma[1]*theta[0]*sin(theta[0]*(t*omega[0]+x))+gamma[2]*theta[1]*exp(theta[1]*(t*epsilon[0]+x))-theta[1]*exp(-theta[1]*(t*epsilon[0]+x)))*(gamma[1]*theta[0]^3*omega[0]*sin(theta[0]*(t*omega[0]+x))+gamma[2]*theta[1]^3*epsilon[0]*exp(theta[1]*(t*epsilon[0]+x))-theta[1]^3*epsilon[0]*exp(-theta[1]*(t*epsilon[0]+x)))

We have sin^2 and cos^1 with the same coefficients

eq5b := collect(normal(eq5a), {cos, sin})

(-9*gamma[1]^2*omega[0]*theta[0]^4-2*gamma[1]^2*omega[0]*theta[0]^2-2*gamma[1]^2*theta[0]^2)*cos(theta[0]*(t*omega[0]+x))^2+(9*exp(theta[1]*(t*epsilon[0]+x))*epsilon[0]*gamma[1]*gamma[2]*theta[0]^2*theta[1]^2+9*exp(theta[1]*(t*epsilon[0]+x))*gamma[1]*gamma[2]*omega[0]*theta[0]^2*theta[1]^2+9*exp(-theta[1]*(t*epsilon[0]+x))*epsilon[0]*gamma[1]*theta[0]^2*theta[1]^2+9*exp(-theta[1]*(t*epsilon[0]+x))*gamma[1]*omega[0]*theta[0]^2*theta[1]^2+2*exp(theta[1]*(t*epsilon[0]+x))*epsilon[0]*gamma[1]*gamma[2]*theta[1]^2-2*exp(theta[1]*(t*epsilon[0]+x))*gamma[1]*gamma[2]*omega[0]*theta[0]^2-2*exp(theta[1]*(t*epsilon[0]+x))*gamma[1]*gamma[2]*theta[0]^2+2*exp(theta[1]*(t*epsilon[0]+x))*gamma[1]*gamma[2]*theta[1]^2+2*exp(-theta[1]*(t*epsilon[0]+x))*epsilon[0]*gamma[1]*theta[1]^2-2*exp(-theta[1]*(t*epsilon[0]+x))*gamma[1]*omega[0]*theta[0]^2-2*exp(-theta[1]*(t*epsilon[0]+x))*gamma[1]*theta[0]^2+2*exp(-theta[1]*(t*epsilon[0]+x))*gamma[1]*theta[1]^2)*cos(theta[0]*(t*omega[0]+x))+(-9*gamma[1]^2*omega[0]*theta[0]^4-2*gamma[1]^2*omega[0]*theta[0]^2-2*gamma[1]^2*theta[0]^2)*sin(theta[0]*(t*omega[0]+x))^2+(-9*exp(theta[1]*(t*epsilon[0]+x))*epsilon[0]*gamma[1]*gamma[2]*theta[0]*theta[1]^3+9*exp(theta[1]*(t*epsilon[0]+x))*gamma[1]*gamma[2]*omega[0]*theta[0]^3*theta[1]+9*exp(-theta[1]*(t*epsilon[0]+x))*epsilon[0]*gamma[1]*theta[0]*theta[1]^3-9*exp(-theta[1]*(t*epsilon[0]+x))*gamma[1]*omega[0]*theta[0]^3*theta[1]+2*exp(theta[1]*(t*epsilon[0]+x))*epsilon[0]*gamma[1]*gamma[2]*theta[0]*theta[1]+2*exp(theta[1]*(t*epsilon[0]+x))*gamma[1]*gamma[2]*omega[0]*theta[0]*theta[1]+4*exp(theta[1]*(t*epsilon[0]+x))*gamma[1]*gamma[2]*theta[0]*theta[1]-2*exp(-theta[1]*(t*epsilon[0]+x))*epsilon[0]*gamma[1]*theta[0]*theta[1]-2*exp(-theta[1]*(t*epsilon[0]+x))*gamma[1]*omega[0]*theta[0]*theta[1]-4*exp(-theta[1]*(t*epsilon[0]+x))*gamma[1]*theta[0]*theta[1])*sin(theta[0]*(t*omega[0]+x))-36*exp(theta[1]*(t*epsilon[0]+x))*exp(-theta[1]*(t*epsilon[0]+x))*epsilon[0]*gamma[2]*theta[1]^4+8*exp(theta[1]*(t*epsilon[0]+x))*exp(-theta[1]*(t*epsilon[0]+x))*epsilon[0]*gamma[2]*theta[1]^2+8*exp(theta[1]*(t*epsilon[0]+x))*exp(-theta[1]*(t*epsilon[0]+x))*gamma[2]*theta[1]^2

eq5c := simplify(eq5b, {cos(theta[0]*(t*omega[0]+x))^2+sin(theta[0]*(t*omega[0]+x))^2 = 1})

(-36*(epsilon[0]*theta[1]^2-(2/9)*epsilon[0]-2/9)*theta[1]^2*gamma[2]*exp(theta[1]*(t*epsilon[0]+x))-9*gamma[1]*((((-omega[0]-epsilon[0])*theta[0]^2-(2/9)*epsilon[0]-2/9)*theta[1]^2+(2/9)*theta[0]^2*(omega[0]+1))*cos(theta[0]*(t*omega[0]+x))+sin(theta[0]*(t*omega[0]+x))*theta[0]*theta[1]*(omega[0]*theta[0]^2-epsilon[0]*theta[1]^2+(2/9)*omega[0]+(2/9)*epsilon[0]+4/9)))*exp(-theta[1]*(t*epsilon[0]+x))+9*gamma[1]*(((((omega[0]+epsilon[0])*theta[0]^2+(2/9)*epsilon[0]+2/9)*theta[1]^2-(2/9)*theta[0]^2*(omega[0]+1))*cos(theta[0]*(t*omega[0]+x))+sin(theta[0]*(t*omega[0]+x))*theta[0]*theta[1]*(omega[0]*theta[0]^2-epsilon[0]*theta[1]^2+(2/9)*omega[0]+(2/9)*epsilon[0]+4/9))*gamma[2]*exp(theta[1]*(t*epsilon[0]+x))-gamma[1]*theta[0]^2*(omega[0]*theta[0]^2+(2/9)*omega[0]+2/9))

eq5d := collect(eq5c, {cos, sin})

(-9*gamma[1]*(((-omega[0]-epsilon[0])*theta[0]^2-(2/9)*epsilon[0]-2/9)*theta[1]^2+(2/9)*theta[0]^2*(omega[0]+1))*exp(-theta[1]*(t*epsilon[0]+x))+9*gamma[1]*(((omega[0]+epsilon[0])*theta[0]^2+(2/9)*epsilon[0]+2/9)*theta[1]^2-(2/9)*theta[0]^2*(omega[0]+1))*gamma[2]*exp(theta[1]*(t*epsilon[0]+x)))*cos(theta[0]*(t*omega[0]+x))+(-9*gamma[1]*theta[0]*theta[1]*(omega[0]*theta[0]^2-epsilon[0]*theta[1]^2+(2/9)*omega[0]+(2/9)*epsilon[0]+4/9)*exp(-theta[1]*(t*epsilon[0]+x))+9*gamma[1]*theta[0]*theta[1]*(omega[0]*theta[0]^2-epsilon[0]*theta[1]^2+(2/9)*omega[0]+(2/9)*epsilon[0]+4/9)*gamma[2]*exp(theta[1]*(t*epsilon[0]+x)))*sin(theta[0]*(t*omega[0]+x))-36*(epsilon[0]*theta[1]^2-(2/9)*epsilon[0]-2/9)*theta[1]^2*gamma[2]*exp(theta[1]*(t*epsilon[0]+x))*exp(-theta[1]*(t*epsilon[0]+x))-9*gamma[1]^2*theta[0]^2*(omega[0]*theta[0]^2+(2/9)*omega[0]+2/9)

coeffs of cos, sin and constant parts

cospart, rest := selectremove(has, eq5d, cos); cospart := cospart/cos(theta[0]*(t*omega[0]+x)); sinpart, rest := selectremove(has, rest, sin); sinpart := sinpart/sin(theta[0]*(t*omega[0]+x)); rest

-9*gamma[1]*(((-omega[0]-epsilon[0])*theta[0]^2-(2/9)*epsilon[0]-2/9)*theta[1]^2+(2/9)*theta[0]^2*(omega[0]+1))*exp(-theta[1]*(t*epsilon[0]+x))+9*gamma[1]*(((omega[0]+epsilon[0])*theta[0]^2+(2/9)*epsilon[0]+2/9)*theta[1]^2-(2/9)*theta[0]^2*(omega[0]+1))*gamma[2]*exp(theta[1]*(t*epsilon[0]+x))

-9*gamma[1]*theta[0]*theta[1]*(omega[0]*theta[0]^2-epsilon[0]*theta[1]^2+(2/9)*omega[0]+(2/9)*epsilon[0]+4/9)*exp(-theta[1]*(t*epsilon[0]+x))+9*gamma[1]*theta[0]*theta[1]*(omega[0]*theta[0]^2-epsilon[0]*theta[1]^2+(2/9)*omega[0]+(2/9)*epsilon[0]+4/9)*gamma[2]*exp(theta[1]*(t*epsilon[0]+x))

-36*(epsilon[0]*theta[1]^2-(2/9)*epsilon[0]-2/9)*theta[1]^2*gamma[2]*exp(theta[1]*(t*epsilon[0]+x))*exp(-theta[1]*(t*epsilon[0]+x))-9*gamma[1]^2*theta[0]^2*(omega[0]*theta[0]^2+(2/9)*omega[0]+2/9)

The exponentials in "rest" cancel leaving one of the equations

eq51 := expand(simplify(rest))

-9*gamma[1]^2*omega[0]*theta[0]^4-36*epsilon[0]*gamma[2]*theta[1]^4-2*gamma[1]^2*omega[0]*theta[0]^2+8*epsilon[0]*gamma[2]*theta[1]^2-2*gamma[1]^2*theta[0]^2+8*gamma[2]*theta[1]^2

We get the others from the coefficients of the exps in cospart and sinpart

eq53 := expand(coeff(cospart, exp(-theta[1]*(t*`ε`[0]+x)))); eq55 := expand(coeff(cospart, exp(theta[1]*(t*`ε`[0]+x)))); eq54 := expand(coeff(sinpart, exp(theta[1]*(t*`ε`[0]+x)))); eq52 := expand(coeff(sinpart, exp(-theta[1]*(t*`ε`[0]+x))))

9*epsilon[0]*gamma[1]*theta[0]^2*theta[1]^2+9*gamma[1]*omega[0]*theta[0]^2*theta[1]^2+2*epsilon[0]*gamma[1]*theta[1]^2-2*gamma[1]*omega[0]*theta[0]^2-2*gamma[1]*theta[0]^2+2*gamma[1]*theta[1]^2

9*epsilon[0]*gamma[1]*gamma[2]*theta[0]^2*theta[1]^2+9*gamma[1]*gamma[2]*omega[0]*theta[0]^2*theta[1]^2+2*epsilon[0]*gamma[1]*gamma[2]*theta[1]^2-2*gamma[1]*gamma[2]*omega[0]*theta[0]^2-2*gamma[1]*gamma[2]*theta[0]^2+2*gamma[1]*gamma[2]*theta[1]^2

-9*epsilon[0]*gamma[1]*gamma[2]*theta[0]*theta[1]^3+9*gamma[1]*gamma[2]*omega[0]*theta[0]^3*theta[1]+2*epsilon[0]*gamma[1]*gamma[2]*theta[0]*theta[1]+2*gamma[1]*gamma[2]*omega[0]*theta[0]*theta[1]+4*gamma[1]*gamma[2]*theta[0]*theta[1]

9*epsilon[0]*gamma[1]*theta[0]*theta[1]^3-9*gamma[1]*omega[0]*theta[0]^3*theta[1]-2*epsilon[0]*gamma[1]*theta[0]*theta[1]-2*gamma[1]*omega[0]*theta[0]*theta[1]-4*gamma[1]*theta[0]*theta[1]

ans := solve({eq51, eq52, eq53, eq54, eq55})

{epsilon[0] = epsilon[0], gamma[1] = 0, gamma[2] = 0, omega[0] = omega[0], theta[0] = theta[0], theta[1] = theta[1]}, {epsilon[0] = 2/(9*theta[1]^2-2), gamma[1] = 0, gamma[2] = gamma[2], omega[0] = omega[0], theta[0] = theta[0], theta[1] = theta[1]}, {epsilon[0] = epsilon[0], gamma[1] = 0, gamma[2] = gamma[2], omega[0] = omega[0], theta[0] = theta[0], theta[1] = 0}, {epsilon[0] = epsilon[0], gamma[1] = gamma[1], gamma[2] = gamma[2], omega[0] = omega[0], theta[0] = 0, theta[1] = 0}, {epsilon[0] = 2*(9*theta[0]^2-2)/(81*theta[0]^2*theta[1]^2+4), gamma[1] = gamma[1], gamma[2] = -(1/4)*gamma[1]^2*theta[0]^2/theta[1]^2, omega[0] = -2*(9*theta[1]^2+2)/(81*theta[0]^2*theta[1]^2+4), theta[0] = theta[0], theta[1] = theta[1]}, {epsilon[0] = 2/(9*theta[1]^2-2), gamma[1] = gamma[1], gamma[2] = gamma[2], omega[0] = 2/(9*theta[1]^2-2), theta[0] = RootOf(_Z^2+1)*theta[1], theta[1] = theta[1]}, {epsilon[0] = -1, gamma[1] = gamma[1], gamma[2] = 0, omega[0] = omega[0], theta[0] = 0, theta[1] = theta[1]}, {epsilon[0] = epsilon[0], gamma[1] = 2*RootOf((epsilon[0]+1)*_Z^2-gamma[2]*epsilon[0]+gamma[2]), gamma[2] = gamma[2], omega[0] = epsilon[0]-1, theta[0] = RootOf((9*epsilon[0]-9)*_Z^2+2*epsilon[0]+2), theta[1] = (1/3)*RootOf(_Z^2-2)}

eqI := ans[5]

{epsilon[0] = 2*(9*theta[0]^2-2)/(81*theta[0]^2*theta[1]^2+4), gamma[1] = gamma[1], gamma[2] = -(1/4)*gamma[1]^2*theta[0]^2/theta[1]^2, omega[0] = -2*(9*theta[1]^2+2)/(81*theta[0]^2*theta[1]^2+4), theta[0] = theta[0], theta[1] = theta[1]}

eqpsi := eval(eq4, eqI)

psi(x, t) = gamma[1]*cos(theta[0]*(-2*t*(9*theta[1]^2+2)/(81*theta[0]^2*theta[1]^2+4)+x))-(1/4)*gamma[1]^2*theta[0]^2*exp(theta[1]*(2*t*(9*theta[0]^2-2)/(81*theta[0]^2*theta[1]^2+4)+x))/theta[1]^2+exp(-theta[1]*(2*t*(9*theta[0]^2-2)/(81*theta[0]^2*theta[1]^2+4)+x))

eqphi := eval(eq2, eqpsi)

phi(x, t) = 3*(-gamma[1]*theta[0]*sin(theta[0]*(-2*t*(9*theta[1]^2+2)/(81*theta[0]^2*theta[1]^2+4)+x))-(1/4)*gamma[1]^2*theta[0]^2*exp(theta[1]*(2*t*(9*theta[0]^2-2)/(81*theta[0]^2*theta[1]^2+4)+x))/theta[1]-theta[1]*exp(-theta[1]*(2*t*(9*theta[0]^2-2)/(81*theta[0]^2*theta[1]^2+4)+x)))/(gamma[1]*cos(theta[0]*(-2*t*(9*theta[1]^2+2)/(81*theta[0]^2*theta[1]^2+4)+x))-(1/4)*gamma[1]^2*theta[0]^2*exp(theta[1]*(2*t*(9*theta[0]^2-2)/(81*theta[0]^2*theta[1]^2+4)+x))/theta[1]^2+exp(-theta[1]*(2*t*(9*theta[0]^2-2)/(81*theta[0]^2*theta[1]^2+4)+x)))

simplify(eval(pde, eqphi))

0

NULL

Download Sol1.mw

I don't know what happened - it disappeared just after I prepared my answer. 

restart;

myproc := proc(x) sin(x) end proc;

proc (x) sin(x) end proc

myproc2 := subsop(3=hfloat,eval(myproc))

proc (x) option hfloat; sin(x) end proc

 

 

Download proc.mw

The easiest way to extract the plot is

p := MathematicalFunctions:-Get(plot, Zeta)

Then plottools:-getdata(p[2][1]) extracts data from the plot, or use lprint(p[2][1]) to see the plot structure. As usual right-clicking on this plot can let you see various options, but I'm not aware of anything that can reconstruct the plot command. (Perhaps you were thinking about a plot component for that.)

In this case the plot can be generated by 

plots:-complexplot3d(Zeta(z), z = -4 - 10*I .. 4 + 40*I,
      view = [default, default, 0 .. 3], orientation = [-32, 68]);

though I didn't try to get all options exactly right.

(When I right-clicked on the plot from FunctionAdvisor, Maple disappeared completely, though not reproducibly!)

I found that with one of that OPs worksheets (one I loaded in that thread) with a few second delays each keystroke (not 20 s, and not always), but it did have one large plot and multiple large expressions. In the past I have attributed those delays to working from a remote disk, but that wasn't the case today.

The bottleneck seems to be the evaluation of the large number of exponentials. If I reformulate this as an (almost) polynomial in three variables, then many of the calculations run much faster. For example one of the fsolve's that took 84 minutes now takes 14 s. For the plots I made a procedure but only tested it at low resulution and didn't compare the timing. Unfortunately, in the fsolve calls where T is an output, this method does not work, and I think this is the case you are most interested in.

Campo_Médio_spin_7_2_-_Forum_new.mw

Rouben's answer is fine if you are looking only for real roots, but you seem to think there are complex roots.  Are you sure there are? You have a numerically very difficult function to solve, with your constants varying over many orders of magnitude. Working in symbolic form allowed significant simplification of your expression. I could get Analytic to finish, but it did not find any solutions despite knowing there is a root in the region.

question128.mw

See the comments on the worksheet.

restart;

with(Typesetting):
Settings(typesetdot = true):

eq1 := (r1 + r2)^2 = r1^2 + x(t)^2 - 2*r1*x(t)*cos(theta(t));
eq2 := diff(eq1, t);
eq3 := subs(diff(x(t), t) = v, diff(theta(t), t) = omega, eq2);
assume(0 < x(t));
assume(0 < t);
assume(0 < theta(t) and theta(t) < 2*Pi);

(r1+r2)^2 = r1^2+x(t)^2-2*r1*x(t)*cos(theta(t))

0 = 2*x(t)*(diff(x(t), t))-2*r1*(diff(x(t), t))*cos(theta(t))+2*r1*x(t)*(diff(theta(t), t))*sin(theta(t))

0 = 2*x(t)*v-2*r1*v*cos(theta(t))+2*r1*x(t)*omega*sin(theta(t))

The ~ after t means that there is an assumption on it. You can change or suppress this with interface(showassumed) or from the menu tools->options->display->assumed variables

xx := solve(eq3, v);

-r1*x(t)*omega*sin(theta(t))/(-cos(theta(t))*r1+x(t))

You need to tell solve to use the assumptions; it is lazy.

eqx := solve(eq1, x(t),useassumptions)[1];

cos(theta(t))*r1+(cos(theta(t))^2*r1^2+2*r1*r2+r2^2)^(1/2)

v := subs(x(t) = eqx, xx);
 

-r1*(cos(theta(t))*r1+(cos(theta(t))^2*r1^2+2*r1*r2+r2^2)^(1/2))*omega*sin(theta(t))/(cos(theta(t))^2*r1^2+2*r1*r2+r2^2)^(1/2)

Is this the simplification you want?

simplify(expand(v));

omega*sin(theta(t))*(-r1^2*cos(theta(t))/(cos(theta(t))^2*r1^2+2*r1*r2+r2^2)^(1/2)-r1)

NULL

Download solve.mw

Internally 1.23/n^1.65 is represented as 1.23*n^(-1.65), from which the results follow. On the other hand 1.23/n^2 is similarly represented, but numer and denom seem to "try harder" and give the results you expect. That is probably because normal, numer, denom are usually used for ratios of polynomials. On the last hand, 1.23/n^(1/2) works as you expect, so I guess Maple just doesn't want to deal with the floating point exponent. 

This sort of unexpected behaviour is what discourages new Maple users (and me too), so in that sense I would describe it as a bug. I submitted an SCR.

I don't know about a limit, but it's certainly more than two lines. But it can be frustrating copying parts of 2d output in terms of what gets selected. In those cases I just use lprint (that's lowercase L), which provides 1-D output, which can then be pasted into 1-D input (e.g., ctrl-m before you paste.)

For the equations, PolynomialSystem with engine = triade returns quickly. Then you can use allvalues to find numerically all real solutions in the cases with RootOf. I would then check when the inequalities are satisfied using the numerical solutions. I didn't work up all the cases, just one of them.

restart

equations_1162 := {-(y+x-1)*k*t+x = 0, (y+x-1)*(p-s)*k-p*(x-1) = 0, -n*y^2+((1-x)*n-m+t+x)*y+m-1 = 0, (x^2-x)*n+y*(p-1)-s+1 = 0, -x*(y+x-1)*m+(p-s)*k+s*y-p = 0, -(y-1)*(y+x-1)*m+(t-1)*y-k*t+1 = 0, (-n+1)*x^2+((-y+2)*n-m-1)*x+(y-1)*n+1+(s-1)*y = 0, n*x*y-t = 0}; nops(equations_1162); indets(equations_1162); inequalities := {0 < k, 0 < m, 0 < n, 0 < p, 0 < x, 0 < y, 0 < (-m*x+p)*t+(s-p)*(m*y-m+1), 0 < (n*x-n-p+1)*t+n*y*(p-s), 0 < (m*x-n*x+n-1)*t+(m*y-n*y-m+1)*s+(n*x-n+1)*(m*y-m+1)-n*y*m*x, 1 < y+x, k < 1, m < 1, n < 1, p < 1}
NULL

8

{k, m, n, p, s, t, x, y}

sol := [SolveTools:-PolynomialSystem(equations_1162, indets(equations_1162), engine = triade)]; nops(sol)

5

For the solutions involving RootOf, you can use allvalues

allvals := [allvalues(sol[2])]

Convert to numerical values and remove complex values.

numallvals := remove(has, evalf(allvals), I); nops(%)

[{k = .17776185, m = 1.29154933, n = 1.406529, p = 1.084001834, s = .666694, t = -2.329993119, x = .8582043168, y = -1.930258}, {k = .62518515, m = .63968933, n = 9.695826, p = -.336487166, s = -.486299, t = 4.007364881, x = .9000101077, y = .459228}, {k = 1.32831735, m = -.49052067, n = .616, p = -134.9239762, s = -28.289, t = -.973106419, x = 4.894773384, y = -.354}, {k = -3.00242757, m = -.60014058, n = -0.86570138e-1, p = .8692193937, s = .642445747, t = 0.34135941e-1, x = -.1505394021, y = 2.619349949}]

4

Check if the inequalities are satisfied. For sol[2] in all cases some are true and some are false

for numsol in numallvals do `~`[is](eval(inequalities, numsol)) end do

{false, true}

{false, true}

{false, true}

{false, true}

NULL

Download solve_system_of_polynomials_with_inequalities.mw

restart;

x:=(4*sigma__d^4 + 4*sigma__d^2*sigma__dc^2 + sigma__dc^4)*n^4 + (-4*sigma__d^4 - 2*sigma__d^2*sigma__dc^2)*n^3 + (sigma__d^4 - 4*sigma__d^2*sigma__dc^2 - sigma__dc^4)*n^2 + (-4*sigma__d^4 + 2*sigma__d^2*sigma__dc^2)*n + 3*sigma__d^4;

(4*sigma__d^4+4*sigma__d^2*sigma__dc^2+sigma__dc^4)*n^4+(-4*sigma__d^4-2*sigma__d^2*sigma__dc^2)*n^3+(sigma__d^4-4*sigma__d^2*sigma__dc^2-sigma__dc^4)*n^2+(-4*sigma__d^4+2*sigma__d^2*sigma__dc^2)*n+3*sigma__d^4

n = 1 is a solution, so divide it out

simplify(x);
x2:=simplify(x/(n-1));

(4*n^3*sigma__d^4+4*n^3*sigma__d^2*sigma__dc^2+n^3*sigma__dc^4+2*n^2*sigma__d^2*sigma__dc^2+n^2*sigma__dc^4+n*sigma__d^4-2*n*sigma__d^2*sigma__dc^2-3*sigma__d^4)*(n-1)

4*(sigma__d^2+(1/2)*sigma__dc^2)^2*n^3+(2*sigma__d^2*sigma__dc^2+sigma__dc^4)*n^2+(sigma__d^4-2*sigma__d^2*sigma__dc^2)*n-3*sigma__d^4

Let y = 2*sigma__d^2+sigma__dc^2, which is explicitly positive. Then we can write x2 as a  quadratic in y

simplify(algsubs(2*sigma__d^2+sigma__dc^2 = y, 4*x2)):
x3:=map(factor,%);

(4*n^3+n-3)*y^2+2*sigma__dc^2*(2*n^2-3*n+3)*y+(5*n-3)*sigma__dc^4

All coefficients of y are positive for n>=2, and since y>0, x3 is always positive, i.e., has no real roots.

 

NULL

Download quartic_equation_in_n_2.mw

Unfortunately solve{identity(...),..) doesn't work with two identity variables. dcoeffs isn't useful here since you don't have derivatives. You can use coeffs. I'm assuming you want separate equations for each t^i*x^j combination.

params.mw

Just put the cursor before "b" and hit "backspace". Or just type "a:=10;b:=20;" then move the cursor to just after the first ";" and then hit "shift-enter".

Unfortunately solve{identity(...),..) doesn't work with two identity variables. dcoeffs isn't useful here since you don't have derivatives. You can use coeffs. I'm assuming you want separate equations for each t^i*x^j combination.

params.mw

 

First 9 10 11 12 13 14 15 Last Page 11 of 81