Carl Love

Carl Love

28150 Reputation

25 Badges

13 years, 346 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

Someone with a reputation as high as yours (currently 3999) can simply add tags to Questions and Posts using the MaplePrimes editor. Or you can do it with the Manage Tags button in the message header.

Looking at the few lines of output that you have before the error, I see several anomalies:

  1. The variable UCode is a set containing a single 2nd-order ODE with a single unknown dependent function phi(t). Thus, it requires exactly 2 initial or boundary conditions for a numeric solution.
  2. UCics -- your set of initial conditions (ICs) -- has 4 elements.

    My guess (only a guess) from these first two anomalies is that your intention is to treat cos(phi(t)) and sin(phi(t)) as separate dependent functions. If that's the case, then you need to make them something like cos(phi1(t)) and sin(phi2(t)), and you need a 2nd ODE.

    There are at least 2 syntactic errors in your specification of the ICs:
     
  3. The evaluated forms of ICs, i.e., what's shown as the output of UCics, should never contain the independent variable t; they should be evaluated at t= 0 in this case. For example, instead of UCparmT[1](0) = 1, you should use eval(UCparmT[1], t= 0) = 1.
  4. Likewise, the evaluated argument of the Maple command D should never contain an independent variable (even when is used outside the context of ICs).
    D(cos(phi(t)))(0) should be D(cos @ phi)(0). But notice that this simplifies to 
    -sin(phi(0))*D(phi)(0) (by the chain rule). But a prior IC says sin(phi(0)) = 0, so this IC just becomes 0 = 0, which isn't a proper IC because it doesn't contain any dependent variable (phi in this case).
     
  5. If my guess about what's wrong in 1 & 2 is wrong, i.e., if you truly want only 1 dependent function phi(t), then the ODE can be massively simplified via trig identities. It's not an error not to simplify it, but I think that you should.

I have not executed your worksheet; my opinions above are based solely on the output that you show up to the point of the 1st error message.

I'm not sure exactly what you're trying to do, and acer's objections still apply, but my guess is that this will go a long way towards doing what you want:

restart
:
my_assign:= proc(params::uneval)
local check:= eval(params, 1); 
    if check::{list,set}(assignable= anything) then
        assign(check)
    else
        error 
            "invalid input: expecting {list,set}"
            "(assignable= anything) but received %1",
            check
    fi 
end proc
:
#Test:
my_assign([b = 2, c = 3, d = 4]); 
b,c,d;
my_assign([b = 3, c = 4, d = 5]);
b,c,d;
                            2, 3, 4
                            3, 4, 5

That procedure can also be used to unassign a name: continuing from above,

my_assign([b= 4, c= 'c']); b, c;

                                                        4, c

I think that you mean a special kind of tangent circle called an osculating circle, which matches the curve in both the first and second derivatives at the point of tangency. Since a simply tangent circle only needs to match in the first derivative, its radius is not unique.

In the formula for the signed radius of osculation below, note that the radius will be negative at a relative maximum and positive at a relative minimum. In other words, it has the same sign as the 2nd derivative. So the center of the osculating circle is obtained in either case (max or min) by adding the signed radius to the y-coordinate of the point of tangency. Although an osculating circle can be found at any point on a curve where the 2nd derivative exists and is nonzero, the simplified formulas given here only work at relative extrema.

f:= x-> (1+x^2)/x:
f1:= D(f):
f2:= D(f1):

#Critical points:
cp:= [solve](f1(x)=0);
                         cp := [1, -1]

#Signed radii of osculating circles:
rc:= (1/f2)~(cp);
                         rc := [1/2, -1/2]

#Centers of osculating cicles:
cc:= `[]`~(cp, f~(cp) +~ rc);
                    cc := [[1, 5/2], [-1, -5/2]]
plots:-display(
    plot(f, min(cp)-1..max(cp)+1),
    plottools:-circle~(cc, rc)[],
    scaling= constrained
);

Here's another way, where is the original table:

new:= table([for i,e in eval(T) do i[1]= e od])

That may be less efficient than acer's similar for loop because it requires the creation of an intermediate list and intermediate `=` pairs. I haven't tested it for efficiency.

The formulas given by Maple here are correct.

The PDF of the sum of two independent random variables is a convolution (the integral (or summation in the discrete case) of a product). Simple proofs of this can be found in numerous places on the Internet. Try a Google search of "pdf of a sum of random variables".

The variance of a sum of independent random variables is the sum of their variances. The variance of X = Normal(0,a) is a^2. The variance of w*X is w^2*a^2. In your example, Var(Z) = w^2*Var(X) + (1-w)^2*Var(Y).

If you remove the inert and simplify the PDF integral's result under reasonable assumptions (such as a > 0, b > 0, w >= 0, w <= 1), you'll see that Z = Normal(0, sqrt(w^2*a^2 + (1-w)^2*b^2)), which is what you may have been expecting.

The fun1 and fun2 in myPlotFunction contain indirect (rather than explicit) references to the variable v. As such, they are seen by Maple as being unrelated to the procedure parameter v. That can be corrected like this:

fun1:= v-> piecewise(cond1, a(x,v), cond2, b(x,v)):
fun2:= v-> piecewise(cond1, c(x,v), cond2, d(x,v)):

myPlotFunction:= v->
    plot(
        [fun1,fun2](v), x= 0..1,
        color= [blue,red], linestyle= [solid,dash], thickness= 3,
        legend= ["H","L"], title= "Multiple plots"
    )
:
Explore(myPlotFunction(v), parameters= [v= 0.0..1.0]);

If cond1 or cond2 contain indirect references to v, they will need to be parameterized also.

The absolute temperature scale with degrees of the same size as Celsius is Kelvin. The absolute temperature scale with degrees of the same size as Fahrenheit is Rankine. All these scales are known to the convert(..., temperature,,,, ...) command. See the help pages ?convert,temperature and ?Temperature.

To have a differential equation where the independent variable is restricted to be integer is nonsense. Why should Maple give a sensible answer? Maybe this should be considered a bug, but does it really matter whether it is fixed?

Use a change of variables so that cos(1/(z-2)) becomes cos(x). Thus x = 1/(z-2) and z = 2+1/x. Find the series of the transformed expression, then revert to z.

f:= z^3*cos(1/(z-2)):
eval(series(eval(f, z= 2+1/x), x), [x= 1/(z-2), O= 0]);

You can see by inspection that the coefficient of the (z-2)^(-1) term is -143/24. Or you can proceed with residue:

residue(%, z=2);
 

There are several issues with the formulation of your Question:

  1. Case I and Case II have identical conditions: rho*eta > 0.
  2. Since cot(0) is undefined, Case II doesn't satisfy the condition w(0) = 0.
  3. The assume statement should include that rho and eta are real:
    assume(rho::real, eta::real, rho*eta > 0).

Maple's answer satisfies the differential equation and initial condition. Under the stated assumptions, it is equivalent to the Case I answer. By bringing an eta outside the square root, the Maple answer avoids the need for signum(rho).

Since Maple source code can be easily read and executed from plain-text files, any of the numerous widely and publically available tools used for managing multi-author source code repositories, such as Github, can be used.

I don't know about changing the font, but it's very easy to change the zoom factor whenever you want, and I usually do. Try Ctrl-3 or Ctrl-4. The default zoom is Ctrl-2.

It works for me. I instantly get this as the derivative:

Matrix(2, 2, [[-1/2*beta(t)*diff(diff(omega(x, t), t), x)*1/lambda, 1/2*diff(diff(u(x, t), t), x)*1/lambda], [1/2*diff(diff(u(x, t), t), x)*1/lambda, 1/2*beta(t)*diff(diff(omega(x, t), t), x)*1/lambda]])

If it continues to not work for you, replace diff with diff~

There's a free app called Maple Calculator for Android and IoS (Apple) mobile devices with cameras. One of its functions is to take a photo of hand-written math, translate it to Maple syntax, and upload it to Maple Cloud. Then from within regular Maple you download it from Maple Cloud.

1 2 3 4 5 6 7 Last Page 1 of 396