Carl Love

Carl Love

27995 Reputation

25 Badges

12 years, 284 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

To get f(6) and f(15), just enter the procedure into Maple, then enter f(6) and f(15).

All four can be entered directly into dsolve. The first two require the addition of option implicit


Problem 1:

restart:

dsolve({(x+epsilon*y(x))*diff(y(x),x)+y(x)=0, y(1)=1}, implicit);

-(1+(1/2)*epsilon)/y(x)+x+(1/2)*epsilon*y(x) = 0

solve(%, y(x));

(-x+(epsilon^2+x^2+2*epsilon)^(1/2))/epsilon, -(x+(epsilon^2+x^2+2*epsilon)^(1/2))/epsilon

Problem 2:

restart:

dsolve({(x^n+epsilon*y(x))*diff(y(x),x)+n*x^(n-1)*y(x)=m*x^(m-1), y(1)=b}, implicit);

y(x)*x^n-x^m+(1/2)*epsilon*y(x)^2-b+1-(1/2)*epsilon*b^2 = 0

solve(%, y(x));

(-x+(b^2*epsilon^2+2*x^m*epsilon+2*b*epsilon+x^2-2*epsilon)^(1/2))/epsilon, -(x+(b^2*epsilon^2+2*x^m*epsilon+2*b*epsilon+x^2-2*epsilon)^(1/2))/epsilon

Problem 3:

restart:

Sol:= dsolve({diff(u(t),t$2)+u(t)+epsilon*u(t)^3=0, u(0)=A, D(u)(0)=0});

u(t) = RootOf(_Z*2^(1/2)*((A^2*_Z^2*epsilon-A^2*epsilon-2*A^2+2*_Z^2)/_Z^2)^(1/2)*(-(2*A^2*_Z^2*epsilon^2-2*A^2*epsilon^2-4*A^2*epsilon-4*epsilon-8)/(epsilon+2))^(1/2))*((-2*epsilon-4)/((epsilon*RootOf(_Z*2^(1/2)*((A^2*_Z^2*epsilon-A^2*epsilon-2*A^2+2*_Z^2)/_Z^2)^(1/2)*(-(2*A^2*_Z^2*epsilon^2-2*A^2*epsilon^2-4*A^2*epsilon-4*epsilon-8)/(epsilon+2))^(1/2))^2-epsilon-2)*(epsilon+2)))^(1/2)*JacobiSN(((1/2)*(2*epsilon+4)^(1/2)*t+InverseJacobiSN(A/(RootOf(_Z*2^(1/2)*((A^2*_Z^2*epsilon-A^2*epsilon-2*A^2+2*_Z^2)/_Z^2)^(1/2)*(-(2*A^2*_Z^2*epsilon^2-2*A^2*epsilon^2-4*A^2*epsilon-4*epsilon-8)/(epsilon+2))^(1/2))*(-2/(epsilon*RootOf(_Z*2^(1/2)*((A^2*_Z^2*epsilon-A^2*epsilon-2*A^2+2*_Z^2)/_Z^2)^(1/2)*(-(2*A^2*_Z^2*epsilon^2-2*A^2*epsilon^2-4*A^2*epsilon-4*epsilon-8)/(epsilon+2))^(1/2))^2-epsilon-2))^(1/2)), RootOf(_Z*2^(1/2)*((A^2*_Z^2*epsilon-A^2*epsilon-2*A^2+2*_Z^2)/_Z^2)^(1/2)*(-(2*A^2*_Z^2*epsilon^2-2*A^2*epsilon^2-4*A^2*epsilon-4*epsilon-8)/(epsilon+2))^(1/2))*(-(epsilon+2)*epsilon)^(1/2)/(epsilon+2))/(-2/(epsilon*RootOf(_Z*2^(1/2)*((A^2*_Z^2*epsilon-A^2*epsilon-2*A^2+2*_Z^2)/_Z^2)^(1/2)*(-(2*A^2*_Z^2*epsilon^2-2*A^2*epsilon^2-4*A^2*epsilon-4*epsilon-8)/(epsilon+2))^(1/2))^2-epsilon-2))^(1/2))*((-2*epsilon-4)/((epsilon*RootOf(_Z*2^(1/2)*((A^2*_Z^2*epsilon-A^2*epsilon-2*A^2+2*_Z^2)/_Z^2)^(1/2)*(-(2*A^2*_Z^2*epsilon^2-2*A^2*epsilon^2-4*A^2*epsilon-4*epsilon-8)/(epsilon+2))^(1/2))^2-epsilon-2)*(epsilon+2)))^(1/2), RootOf(_Z*2^(1/2)*((A^2*_Z^2*epsilon-A^2*epsilon-2*A^2+2*_Z^2)/_Z^2)^(1/2)*(-(2*A^2*_Z^2*epsilon^2-2*A^2*epsilon^2-4*A^2*epsilon-4*epsilon-8)/(epsilon+2))^(1/2))*(-(epsilon+2)*epsilon)^(1/2)/(epsilon+2))

indets(%, specfunc(anything, RootOf));

{RootOf(_Z*2^(1/2)*((A^2*_Z^2*epsilon-A^2*epsilon-2*A^2+2*_Z^2)/_Z^2)^(1/2)*(-(2*A^2*_Z^2*epsilon^2-2*A^2*epsilon^2-4*A^2*epsilon-4*epsilon-8)/(epsilon+2))^(1/2))}

alias(R=%[]);

R

Sol;

u(t) = R*((-2*epsilon-4)/((epsilon*R^2-epsilon-2)*(epsilon+2)))^(1/2)*JacobiSN(((1/2)*(2*epsilon+4)^(1/2)*t+InverseJacobiSN(A/(R*(-2/(epsilon*R^2-epsilon-2))^(1/2)), R*(-(epsilon+2)*epsilon)^(1/2)/(epsilon+2))/(-2/(epsilon*R^2-epsilon-2))^(1/2))*((-2*epsilon-4)/((epsilon*R^2-epsilon-2)*(epsilon+2)))^(1/2), R*(-(epsilon+2)*epsilon)^(1/2)/(epsilon+2))

Problem 4:

restart:

dsolve({diff(y(x),x$2)+2*diff(y(x),x)^2+3*diff(y(x),x) = -sin(x), y(0)=1, D(y)(0)=0});

y(x) = -(3/4)*x+(1/2)*ln((MathieuC(-9, -4, -(1/4)*Pi+(1/2)*x)*MathieuSPrime(-9, -4, (1/4)*Pi)+3*MathieuC(-9, -4, -(1/4)*Pi+(1/2)*x)*MathieuS(-9, -4, (1/4)*Pi)+3*MathieuS(-9, -4, -(1/4)*Pi+(1/2)*x)*MathieuC(-9, -4, (1/4)*Pi)+MathieuS(-9, -4, -(1/4)*Pi+(1/2)*x)*MathieuCPrime(-9, -4, (1/4)*Pi))/(MathieuSPrime(-9, -4, -(1/4)*Pi+(1/2)*x)*MathieuC(-9, -4, -(1/4)*Pi+(1/2)*x)-MathieuCPrime(-9, -4, -(1/4)*Pi+(1/2)*x)*MathieuS(-9, -4, -(1/4)*Pi+(1/2)*x)))+1

 


Download 4_dsolves.mw

Let X:= [x1, ..., xm] and Y:= [[y11, ..., y1n], ..., [ym1, ..., ymn]]. Then

plot([[[X[i],Y[i][j]] $ i= 1..m] $ j= 1..n], style= point);

This version uses color to show which Y-list the point came from.

Let me know how that goes.

Here are some hints: Each geometric object asked for can be created with a single command from ?geom3d with no intermediate computation required. Just follow the syntax shown in the help files. The commands required are, in order: with, ?geom3d,point , point, point, ?geom3d,line , ?geom3d,plane , ?geom3d,intersection , ?geom3d,sphere (with the the centername option),  line, ?geom3d,FindAngle , ?geom3d,coordinates , and ?geom3d,intersection . And you'll need evalf to get the decimal approximation for the first answer.

You just need to set the environment variable ?UseHardwareFloats :

UseHardwareFloats:= false;

Let me know how that goes.

(You probably know this, but I'll say it anyway: Maple's floating-point system is base 10, not base 2. So don't expect some of the standard examples of floating-point errors to work exactly the same way as is shown in the textbooks.)

You need to put forget(x) before the x:= proc....

Since Maple allows a newline character anywhere that it allows whitespace, continuation characters are very rarely needed. Your example would work just as well without the backslash. Even long strings can be split "simply "
"like "
"this."

There is no logical concept of a "line" of code in Maple. Statements can, and often do, go on for tens of lines.

That being said, I have no information about the situation in Maple IDE.

Instead of type(e, negative) you need to say is(e < 0). The type of an expression is an inherent property of the expression, and it is not affected by assumptions.

You should not use and in the assumptions; just separating them with the commas is logically equivalent to and.

Putting it together, your statement should be

is(e < 0) assuming  
     d1 > 0, d2 > 0, d3 > 0, Kw > 0, Ks > 0,
     0 < pfw1, pfw1 < 1, 0 < pfw2, pfw2 < 1, 0 < pfw3, pfw3 < 1,
     0 < pfs1, pfs1 < 1, 0 < pfs2, pfs2 < 1, 0 < pfs3, pfs3 < 1,
     d1-pfw1*Kw-pfs1*Ks > 1, d2-pfw2*Kw-pfs2*Ks > 1, d3-pfw3*Kw-pfs3*Ks > 1,
     pfw1 <> pfw2, pfw2 <> pfw3, pfs1 <> pfs2, pfs2 <> pfs3
;

Maple's response is false.

Addressing your question 2: There is no algorithm for deriving the conditions under which a complicated, non-polynomial, multivariate expression is negative (or positive, or zero).

Let's say that your expression with the h for the difference quotient is called dq. Then you need to say

limit(dq, h= 0);

Here's your problem:

f:= x-> x^3+3*cos(x):
dq:= (f(x+h)-f(x))/h:
limit(dq, h=0);

 

Change plot3d to plots:-implicitplot3d. Then adjust the ranges of x, y, and z to get a better plot.

Here's how to do it with the order. That is, how to run Maximize and save each call to the objective function and the order that the calls were made.

 

(**)

restart:

Here's an example maximization problem.

(**)

Optimization:-Maximize(sin(x), {x >= 0, x <= 3*Pi/2});

[1., [x = HFloat(1.5707963267950427)]]

Now I will convert this problem into a form where we save each call to the objective function for later use.

(**)

Problem:= module()
local
     ct,
     Calls
;
export
     Obj:= proc(x)
     local r:= sin(x);  
          ct:= ct+1;  
          Calls[ct]:= (x,r);  
          r  
     end proc,

     Constr1:= x-> 0 - x,  # x >= 0
     Constr2:= x-> x - 3*Pi/2,  # x <= 3*Pi/2
     Constrs:= {Constr1, Constr2},

     Init:= proc()  
          ct:= 0;  
          Calls:= table()
     end proc,

     AllObjEvals:= proc()  
     local k;  
          [seq([Calls[k]], k= 1..ct)]
     end proc
;
     Init()
end module:

 

(**)

Optimization:-Maximize(Problem:-Obj, Problem:-Constrs);

[1., Vector(1, {(1) = 1.57079632679490})]

(**)

Data:= Problem:-AllObjEvals();

[[HFloat(0.0), HFloat(0.0)], [0., 0.], [0.50000000000000000000000000e-8, 0.49999999999999999791666667e-8], [-0.50000000000000000000000000e-8, -0.49999999999999999791666667e-8], [HFloat(1.0), HFloat(0.8414709848078965)], [1., .84147098480789650665250232], [1.0000000050000000000000000, .84147098750940802547481359], [.99999999500000000000000000, .84147098210638496679341644], [HFloat(2.1753426496700228), HFloat(0.8227600473221269)], [2.175342649670023, .82276004732212685306409917], [2.1753426546700230000000000, .82276004448018250601607050], [2.1753426446700230000000000, .82276005016407117954312665], [HFloat(1.569745684590937), HFloat(0.9999994480755304)], [1.569745684590937, .99999944807553039954776143], [1.5697456895909370000000000, .99999944808078359710110782], [1.5697456795909370000000000, .99999944807027717699442884], [HFloat(1.570855739119737), HFloat(0.9999999982350878)], [1.570855739119737, .99999999823508782904968963], [1.5708557441197370000000000, .99999999823479075492566251], [1.5708557341197370000000000, .99999999823538487817371679], [HFloat(1.5707963267845844), HFloat(1.0)], [1.570796326784584, .99999999999999999999994682], [1.5707963317845840000000000, .99999999999999998755150992], [1.5707963217845840000000000, .99999999999999998744838373], [HFloat(1.570796326794897), HFloat(1.0)], [1.570796326794897, 1.0000000000000000000000000], [1.5707963317948970000000000, .99999999999999998749999810], [1.5707963217948970000000000, .99999999999999998750000190]]

(**)

 

Please let me know if you are able to apply this to your problem.

Download Max_with_saved_dat.mw

conjugate(1/sqrt(I*t*lambda+m))*sqrt(lambda^2*(t^2)+m^2)*(1/sqrt(I*t*lambda+m)):
simplify(evalc(%));
                               1

It would not be possible for Maple in general to implement what you want. Maple deals with polynomial arithmetic over finite fields. x^2+x+1 is considered an irreducible polynomial over Z[2]; it is not equivalent to 1. So Z[2]/(x^2+x+1) is the finite field with 4 elements.

But, you can easily redefine mod to suit your purposes:

restart:
Modp:= eval(modp):
unprotect(modp):
modp:= (e,m)-> Modp(`if`(m=2, evalindets(e, `^`, x-> op(1,x)), e), m):
protect(modp):

x^2 mod 2;
                                            x

a*b*c+a^2*c*d+d+c^2*d^2*a^2*b^2+d^2*a*b^2*c+d^2*a*b^2+a*c+c*d+d*b+d*a^2*b*c+c+c^2+d^2*a^2*c+d^2*a^2*b^2*c+d^2*b^2+d^2*a+
d^2+b*c^2+c^2*d^2+b*c^2*d+a^2*c^2*b*d+c^2*d^2*a^2+c*d*a*b+a*b^2*c*d+b^2*c*d+b^2*c^2*d+d^2*a*c+a^2*b^2*c^2*d+b*c+d*a*b+d*a+
a^2*c^2+a^2*c^2*b+c^2*d^2*b^2 mod 2;
                                             0

Yes, function application distributes over most other operators; and constants, when applied as functions, become constant functions. Example:

((D-2)^3)(sin)(x);

There is a missing character between your k and 1. I will assume it is a plus sign. You can enter the expression pretty much as you currently have it into Maple:

Limit((Sum((n-k)/(k+1), k= 0..n-1) -ln(n!))/n, n= infinity);

value(%);

                                      γ

The answer is hard to read when I cut-and-paste it above, but it is the Euler-Mascheroni constant, gamma.

 

First 344 345 346 347 348 349 350 Last Page 346 of 394