Robert Israel

6577 Reputation

21 Badges

18 years, 208 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are answers submitted by Robert Israel

Your initial condition has [Xr, Yr, Zr] = [X,Y,Z] at t=13960727, i.e. you're starting at the centre of the Earth. This makes the equation singular, as well as being unphysical. You might get better results if you start somewhere on the surface of the Earth.
In Options,Display, switch "Input display" to "Maple Notation". And while you're at it, use the Classic interface rather than Standard. Much simpler for those of us who aren't fans of fancy mouse-work.
I think Scott is right: somewhere you've defined X[inlet] := 0, without realizing that this is actually an assignment to X. Fortunately, it's now possible to have subscripted variables that are not the same as indexed variables. In Standard GUI with Typesetting level set to Extended, the first time X[inlet] appears in your worksheet (in a 2D Math input region), select it, right-click on it and in the pop-up menu choose 2D Math, Convert To, Atomic Identifier. To avoid having to do this whenever you want to put X[inlet] in input, you can copy-and-paste.
Actually I think if you want a series solution, you might try for one around x = -4/5, as this is where x = 6*x+4. For example, with y(-4/5) = -9/5, I get
> eq4 := eval(eq, y=( z-> -9/5 + a1*(z+4/5) + a2*(z+4/5)^2+ 
          a3*(z+4/5)^3 + O((z+4/5)^4)));
  series(eq4, x=-4/5);
  simplify(%) assuming real;
  eqs := {seq(coeff(%,x+4/5,j),j=0..2)};
  fsolve(eqs);
{a1 = -3.074418522, a2 = -76.13893591, a3 = -26377.20235} The rapid increase in the magnitude of the coefficients makes me doubt that this is the start of a convergent series.
Do you mean something like this?
> expr:= exp(mu*t);
  expr2:= subs(mu=u+I*v,expr);
  evalc([Re(expr2), Im(expr2)]);
Or perhaps
> eval(%,{u=Re(mu),v=Im(mu)});
x^3 + (y'(x) - 9*x)^(5/(y(x)+2)) + 4*(x-y(x))^(y'(6*x+4)) = 0 is a functional differential equation, not a differential equation, so dsolve won't touch it. BTW, plugging in x = 1 and y(1) = 0, I get (y'(1) - 9)^(5/2) = -5, which has no real solution. Are you sure this is the equation you want?
The "less than" problem is due to < being interpreted as the start of an html tag. You have to either write it as < ; (without the space) or change your Input format to plain text. For maximization over intervals using symbolic mathematics, you can try something like this:
 > maximize(sin(x^2) - y^2 + x*y, x = -2 .. 3, y = -infinity .. 3, location);
9/4+sin(9), {[{x = 3, y = 3/2}, 9/4+sin(9)]} Caution: this is limited by the power of "solve", and may not always work even when "solve" should. In this case the answer is wrong. The correct answer would be 1/4*15^(1/2)+3/4*Pi-1/4*arccos(1/4), {[{x = (3*Pi-arccos(1/4))^(1/2),y = 1/2*(3*Pi-arccos(1/4))^(1/2)}]} For maximization using numerical methods:
 > Optimization:-Maximize(sin(x^2) - y^2 + x*y, x = -2 .. 3, y = -infinity .. 3);
[2.99491130883099466, [x = 2.84722002818764296, y = 1.42361001396717612]] Correct in this case, but in general it may only produce a local maximum rather than the global maximum. For global maximization, try GlobalSolve in the Global Maximization Toolbox.
Ummm... have you noticed that this site is generally for questions having to do with Maple? Was your microcontroller programmed in Maple? If not, what does this have to do with Maple?
_EnvExplicit = true is needed for solve to work on irreducible quartics, but it is not needed for cubics.
I think you'd get better results here if you asked a more specific question, preferably concerning Maple.
According to Maple 11:
 >int(1/(1+a*sin(theta)),theta=0..Pi);
(2*arctanh(a/(-1+a^2)^(1/2))+ csgn(1/(-1+a^2)^(1/2)*I)*Pi*I)/(-1+a^2)^(1/2) which seems to be correct, despite the singularity at a=1 (which is removable), and requires no piecewise. However, it doesn't seem to work well with dsolve(...,numeric).
> Q := %:
  res := dsolve({diff(y(a),a) = Q, y(0) = 0},y(a), numeric);
  res(2);
[a = 2., y(a) = .64446418501644e-1-4.1373330726645*I] I'm not sure what's causing the bug here. The value should be approximately 4.201779203, which (presumably not by coincidence) is the real part minus the imaginary part of the answer above. As for the problem with the system containing piecewise, I'd like to see the actual system before commenting. Can you upload the worksheet and post a link?
The problem is that you have more variables than residuals: en5 has two residuals and three variables. If you add another residual of 0, it works: you get an answer where the residuals are effectively all 0. There's a whole curve consisting of such solutions.
> Optimization:-LSSolve([op(en5),0]);

LSSolve: calling nonlinear LS solver
SolveUnconstrained: using method=modifiednewton
SolveUnconstrained: number of problem variables 3
SolveUnconstrained: number of residuals 3
PrintSettings: optimality tolerance set to 0.3256082241e-11
PrintSettings: iteration limit set to 1200
SolveUnconstrained: trying evalhf mode
E04FCF: conditions for a minimum are not all satisfied, but a better point could not be found
E04FCF: number of major iterations taken 10
[3.7396937288134*10^(-29), [t1[1] = .343921425705111083, t2[2] = .528123104718718372, t3[2] = .459294725513866630]] The usual least squares setup is that there are more equations than variables, so there is no solution that satisfies all the equations, but you try to come as close as you can to satisfying them in the sense of minimizing the sum of the squares of the residuals. Still, this is a bug: if the number of variables must not be more than the number of residuals, that should be mentioned in the help page, and the error message should clearly state what the trouble is.
I've never encountered this error in LSSolve. Please post the actual commands that produce it (including the definition of e), or upload a worksheet where we can reproduce the problem.
You didn't include links to the files, but looking at the one file you have uploaded I see an expression with 7 arbitrary constants, ``(_c[1],_C[1],_C[2],_C[3],_C[4],_C[5],_C[6])
Yes, that's what I meant. (Dang it, I should know better by now)
First 127 128 129 130 131 132 133 Last Page 129 of 138