Carl Love

Carl Love

28070 Reputation

25 Badges

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

MaplePrimes Activity


These are answers submitted by Carl Love

Assuming that your count of boundary conditions is correct, a common cause for this error is having a parameter whose numerical value has not been specified. I can't diagnose it further unless you post the code.

restart:
f:= 3-x+2*x^2:  g:= 4+k*x-x^2:
solve(int(f*g, x= -1..1), k);

If you want to get fancy with the inner product notation, you could do

restart:
f:= x-> 3-x+2*x^2:  g:= x-> 4+k*x-x^2:
local `<,>`:= (f,g)-> int(f*g, -1..1):
sqrt(<f,f>);

solve(<f,g>, k);

 

The following does not prove the divergence, but the wildly changing values makes convergence highly suspect:

restart:
Digits:= 15:
f:= z-> exp(-z^2*sin(z)^2):
F:= d-> int(f(z), z= 0..infinity, numeric, epsilon= 10.^(-d)):
'F(d)' $ d= 6..9;



These wildly changing values also make convergence highly suspect:

restart:
Digits:= 10:
f:= z-> exp(-z^2*sin(z)^2):
int(f(z), z= 0..infinity, numeric);

2.835068335

Digits:= 15:
int(f(z), z= 0..infinity, numeric);

2.68030993194038

@Dira I doubt that your instructor meant/said that you should literally replace f''(x) with a limit. My guess is that s/he meant/said that you should replace f''(x) with the expression used in the limit definition of the derivative (but without actually taking the limit). That expression is the slope of the secant line. So, replace f''(x) with

(subs(x= guess1, fp) - subs(x= guess0, fp)) / (guess1 - guess0)

Note that the secant method requires two intial guesses: you need initial values for both guess0 and guess1. This is a significant difference from Newton's method---the user interface must be different.

f:= piecewise(x <= 1, x^2+1, x <= 2, x^2-1, x+1);

plot(f, x= 0..3);

The issue (which can be determined by reading the OP's worksheet) is that Maple incorrectly translates a four-argument MeijerG expression from Mathematica. Maple's MeijerG takes strictly three arguments. MmaToMaple translates "MeijerG[{{0, 1/2}, {}}, {{0, 1}, {-1, -1}}, 10, 1/2]" as MeijerG([[0, 1/2], []], [[0,1], [-1,-1]], 10, 1/2), but the last argument, 1/2, is ignored by Maple's MeijerG. This extra argument is meaningful to Mathematica, changing the numeric evaluation from 0.810281 to 0.320375.

Your worksheet's directory is not necessarily the same as your current directory. If you're using Maple 18, try

M:= ExcelTools:-Import(cat(interface(worksheetdir),"Book1.xlsx"));

If you're not using Maple 18, use a fully specified filename. Also note the use of := instead of =.

If you use assume thus:

assume(a::real, b::imaginary);

then the conjugate operations will proceed as you said in the Question, when pushed along by expand.

expand(conjugate( k1*a + k2*conjugate(b)) ) ;



 

The rules for changing the index in a sum are the same as the rules for changing a variable of integration. Likewise, the rule for expanding a sum is the same as that for integration.  There is a SumTools package, but it doesn't have simple manipulations like IntegrationTools's Expand and Change. So we change the inert sum to an inert integral, perform the manipulations, then change it back to a sum.

with(IntegrationTools):
A:= Sum(a[n]*phi(n)+b[n+1]*phi(n+2),n=0..N);

Expand(subs(Sum= Int, %));


The applyop is used below because we only want to apply the Change to the second operand.

 

subs([m= n, Int= Sum], applyop(Change, 2, %, m= n+2));

The change-of-variables step can also be done with PDEtools:-dchange, but that doesn't handle the Expand step.

 

You will get some minimal information about the steps by setting

infolevel[solve]:= 5:

before the call to solve.

In the first line, change with (plots) to with(plots). That is, get rid of the space between the words.

In the last line, change odeplots to plot, and end the line with a semicolon rather than a colon.

From your keywords, I see that maybe you think unapply has something to do with this problem. Indeed, that is true. In your current code, Maple is treating the function/procedure parameters omega and F as different from the omega and F that appear in A and B. Function/procedure parameters are always local to their procedure. The command unapply constructs the function/procedure body so that this is so.

A:= < < omega^2-5, 4 > | < 4, omega^2-5 > >:
B:= < -F, 0 >:
amp:= unapply(LinearAlgebra:-Norm(A^(-1).B, 2), omega, F);

amp(0,4);

plot(amp(omega,4), omega= 0..5, discont);

You'll need to rescale each frame so that its axes are the same as the first/largest frame. Using animate/animate3d will not help.

You need to replace each occurence of e^anything with exp(anything).


ex:= exp(I*theta);

exp(I*theta)

(1)

evalc(ex);

cos(theta)+I*sin(theta)

(2)

evalc(Re(ex));

cos(theta)

(3)

evalc(Im(ex));

sin(theta)

(4)

ex:= 1/(I+sqrt(3));

1/(I+3^(1/2))

(5)

rationalize(ex, ratdenom);

(1/4)*3^(1/2)-(1/4)*I

(6)

 


Download evalc.mw

First 309 310 311 312 313 314 315 Last Page 311 of 395