Carl Love

Carl Love

28095 Reputation

25 Badges

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

MaplePrimes Activity


These are answers submitted by Carl Love

ee:= sin(3*arcsin(x)):
expand(%);

Use command Bits:-Join. This will require you to enter the number as a list of 0s and 1s. If you'd rather not enter the commas that will be required for that, here is a very small procedure that will convert the input from a string of 0s and 1s.

BitStringInput:= Bits:-Join@parse~@StringTools:-Explode@StringTools:-Reverse:
x:= BitStringInput("10010");

 

You can perform bitwise logical operations on your bit strings (which, for efficiency, are represented internally as integers) using other commands in the Bits package. When you want to see your output as a bit string, do

Out:= Bits:-String(x, msbfirst);

 

restart:
f:= (x^2+2*x+3) - (k+5*x-7*x^2):
solve(int(f, x= `..`(solve(f, x))) = 36, k);

Here is a way completely different from Kitonum's. In the procedure below, I take the two quadratic solutions returned by solve and determine which is the positive branch numeric evaluation.

PositiveRoot:= proc(
     eqn::{algebraic,`=`},
     var::name,
     {evals::set(name= complexcons):= indets(eqn, And(name, Not(constant))) =~ 0}
)
local
     Sol:= [solve(eqn, var)],
     E:= evalf(eval(Sols, evals))
;
     if nops(E) = 0 then [][]
     elif nops(E) = 1 then Sol[]
     elif nops(E) > 2 then
          error "Procedure only intended for quadratic equations."
     elif Im(E[1]) > Im(E[2]) then Sol[1]
     elif Im(E[1]) = 0 then
          `if`(E[1] > E[2], Sol[1], Sol[2])
     else
          Sol[2]
     end if
end proc:

Example of use:

PositiveRoot(eq1, R);

I echo Markiyan's concerns: The extremely large coefficients, especially in eq3 and eq4, overwhelm the significance of the relatively small final results. Consider using exact arithmetic.

The proximate cause of your error message is that you enclosed the boundary conditions in square brackets. Thus, you have two sets of brackets in the call to pdsolve. 

Any finite, simple, closed region of a computer plot is a polygon, being composed of a finite number of line segments, however small. Thus it can be filled with plots:-polygonplot. You may need to extract the vertices from the original plot structure to do this. If you post your code, I can show you how. 

Indeed A^%T is not even necessarily square, let alone invertible. Use command LinearAlgebra:-LeastSquares(A, b, optimize). You can also multiply by the pseudoinverse of A, which you can obtain as LinearAlgebra:-MatrixInverse(A, method= pseudo).

Your syntax is perfect, and it gives me the answer -3/2. Try using the restart command.

Taking the constants to be 1 and plotting shows that there is only one positive solution. The solve gives me one answer plus the warning. So, just ignore the warning and use the answer, which is h*c/T/k/(LambertW(-5*exp(-5) )+5).

I'm not familiar with the coeffs option to dsolve. Where is it documented? If I try it, I just get an error message that leads me to believe that no such option exists. But just trying without any options, I get an answer in terms of integrals of Airy functions. 

Apply the command fnormal to the results of floating-point computation before making an equality comparison with zero. 

plots:-display([
     plot(p),
     plots:-textplot(
          zip((a,b)-> [a[], ""||b], p, [$1..nops(p)]),
          align= {above, left}
     )
]);

If you cancel theta[m]s in your x, you get

From this, it is clear that x > 1/4 for the range of phi that you are using. So that plot showing going to 0 is bogus. (Note: x is the vertical axis---labelled "Cooperation level.")

Where are you reading the "description of the function" that you mention? Is it at ?IsSimilar? What version of Maple? Looking in Maple 16 help, I see no mention of a third argument P. My help says that the third argument can be output= 'C' (the C being literal). Thus, to get P, you can do

P:= LinearAlgebra:-IsSimilar(A, B, output= 'C');

No initialization of P is required.

nops does not work on tables. Use numelems instead.

First 275 276 277 278 279 280 281 Last Page 277 of 395