MaplePrimes Questions

Hi everyone! I need to weight a serie of values which x1 range go from 280 to 4000 by the factors provided by another serie of values, which x2 values go from 206.6 to 12400. In the graphs, the red curve is a listplot of the serie which y1 values I want to weight by the y2 values of the listplot of the serie in black. I want the resulting serie in the x1 range, but with the y3 values equal to y2*y1. How can I do that since the series have different intervals?

 

 

Serie in red=S and serie in black=t

S:=

...[417., .96392], [418., .92392], [419., .96354], [420., .88467], [421., 1.0067], [422., .99499], [423., .96531], [424., .96182], [425., .99312], [426., .96667], [427., .9355], [428., .94625], [429., .87766], [430., .70134], [431., .63779], [432., 1.0628], [433., .9905], [434., .91653], [435., 1.007], [436., 1.1061], [437., 1.1306], [438., .99368], [439., .95753], [440., 1.0993], [441., 1.0859], [442., 1.164], [443., 1.1823], [444., 1.1537], [445., 1.1992], [446., 1.0766], [447., 1.2257], [448., 1.2422], [449., 1.2409], [450., 1.2881], [451., 1.3376], [452., 1.2822], [453., 1.1854], [454., 1.273], [455., 1.2655], [456., 1.3088], [457., 1.3213], [458., 1.2946], [459., 1.2859], [460., 1.2791], [461., 1.3255], [462., 1.3392], [463., 1.3452], [464., 1.3055], [465., 1.2905], [466., 1.319], [467., 1.2616], [468., 1.3178], [469., 1.3247], [470., 1.2749], [471., 1.2975], [472., 1.3661], [473., 1.3144], [474., 1.3304], [475., 1.3755], [476., 1.3299], [477., 1.3392], [478., 1.3839], [479., 1.3586], [480., 1.3825], [481., 1.3836], [482., 1.3899], [483., 1.3742], [484., 1.3492], [485., 1.3457], [486., 1.0918], [487., 1.2235], [488., 1.3252], [489., 1.2492], [490., 1.3968], [491., 1.3435], [492., 1.2818], [493., 1.3719], [494., 1.3402], [495., 1.4238], [496., 1.3548], [497., 1.3788], [498., 1.3421], [499., 1.3429], [500., 1.3391], [501., 1.299], [502., 1.2991], [503., 1.3597], [504., 1.2682], [505., 1.3598], [506., 1.4153], [507., 1.3548], [508., 1.321], [509., 1.385], [510., 1.3497], [511., 1.3753], [512., 1.4125], [513., 1.3277], [514., 1.3003], [515., 1.3385], [516., 1.3514], [517., 1.1017], [518., 1.2605], [519., 1.2222], [520., 1.3349], [521., 1.3452], [522., 1.376], [523., 1.2976], [524., 1.3962], [525., 1.3859], [526., 1.3479], [527., 1.1795], [528., 1.3508], [529., 1.4142], [530., 1.3598], [531., 1.4348], [532., 1.4094], [533., 1.259], [534., 1.3491], [535., 1.3701], [536., 1.4292], [537., 1.3229], [538., 1.3896], [539., 1.3558], [540., 1.3096], [541., 1.2595], [542., 1.3714], [543., 1.3493], [544., 1.3971], [545., 1.3657], [546., 1.3536], [547., 1.3717], [548., 1.3331], [549., 1.3752], [550., 1.3648], [551., 1.3639], [552., 1.3923], [553., 1.3533], [554., 1.3802], [555., 1.3883], [556., 1.3651], [557., 1.3321], [558., 1.3613], [559., 1.2885], [560., 1.3118], [561., 1.3885], [562., 1.3225], [563., 1.3731], [564., 1.3466], [565., 1.3555], [566., 1.2823], [567., 1.3673], [568., 1.3554], [569., 1.3228], [570., 1.324], [571., 1.281], [572., 1.3534], [573., 1.3595], [574., 1.3527], [575., 1.3225], [576., 1.3118]...

 

t:=

[[206.6000, 0.9110470095e-3], [210.1000, 0.8504840202e-3], [213.8000, 0.8153191021e-3], [217.5000, 0.7517070516e-3], [221.4000, 0.7035057451e-3], [225.4000, 0.6694785180e-3], [229.6000, 0.6318423899e-3], [233.9000, 0.5994622965e-3], [238.4000, 0.5764355678e-3], [243.1000, 0.5331430203e-3], [248.0000, 0.4950946716e-3], [253.0000, 0.4422658739e-3], [258.3000, 0.4023846661e-3], [263.8000, 0.3732428357e-3], [269.5000, 0.3444825682e-3], [275.5000, 0.3307336604e-3], [281.8000, 0.3570645679e-3], [288.3000, 0.4052774535e-3], [295.2000, 0.4741877081e-3], [302.4000, 0.5345931300e-3], [310.0000, 0.6002211844e-3], [317.9000, 0.7217256785e-3], [326.3000, 0.9176207886e-3], [335.1000, 0.1271492339e-2], [344.4000, 0.1679935813e-2], [354.2000, 0.1976514731e-2], [364.7000, 0.2169413297e-2], [375.7000, 0.2420056977e-2], [387.5000, 0.2698356864e-2], [399.9000, 0.3092320191e-2], [413.3000, 0.3891714441e-2], [427.5000, 0.4875961623e-2], [442.8000, 0.6098167657e-2], [459.2000, 0.8645631738e-2], [476.9000, 0.1639763449e-1], [495.9000, 0.1611551307e-1], [516.6000, 0.1102654621e-1], [539.1000, 0.5287562153e-2], [563.6000, 0.3253578980e-2], [590.4000, 0.2176718340e-2], [619.9000, 0.1510939515e-2], [652.5000, 0.1117755662e-2], [688.8000, 0.8568924681e-3], [729.3000, 0.6693019750e-3], [774.9000, 0.5484788449e-3], [826.6000, 0.4632457834e-3], [885.6000, 0.3982461677e-3], [953.7000, 0.3505755460e-3], [1033.000, 0.3130972421e-3], [1127.000, 0.2814970511e-3], [1240.000, 0.2609345123e-3], [1305.000, 0.2500612658e-3], [1378.000, 0.2397447628e-3], [1459.000, 0.2312899569e-3], [1550.000, 0.2268792462e-3], [1653.000, 0.2197119097e-3], [1771.000, 0.2106962051e-3], [1907.000, 0.2046935228e-3], [2066.000, 0.2003490235e-3], [2254.000, 0.1974613611e-3], [2480.000, 0.1948841680e-3], [2755.000, 0.1957355188e-3], [3100.000, 0.1937027704e-3], [3542.000, 0.1867538618e-3], [4133.000, 0.1849393481e-3], [4959.000, 0.1835339010e-3], [6199.000, 0.1838769393e-3], [8266.000, 0.1869179329e-3], [12400.00, 0.1990760933e-3]]

 

Can anyone coax Maple to solve this reccurence relation? It seems harmless enough but Maple is struggng a bit with "hypergeomsols."

f := c -> (2*n-c)*f(c-1) - (c-1)*n*f(c-2);

f(0) := 1;

f(1) := 2*n-1;

 

Determine using determinants the range of values of a (if any) such that
f(x,y,z)=4x^2+y^2+2z^2+2axy-4xz+2yz
has a minimum at (0,0,0).

From the theory, I understand that if the matrix corresponding to the coefficients of the function is positive definite, the function has a local min at the point. But, how do I get the range of values of a such that f is a min? Is this equivalent to finding a such that det(A) > 0?

 

2.

Now modify the function to also involve a parameter b: g(x,y,z)=bx^2+2axy+by^2+4xz-2a^2yz+2bz^2. We determine conditions on a and b such that g has a minimum at (0,0,0).
By plotting each determinant (using implicitplot perhaps, we can identify the region in the (a,b) plane where g has a local minimum.

Which region corresponds to a local minimum?

Now determine region(s) in the (a,b) plane where g has a local maximum.

I don't understand this part at all..

I've got the following matrix :

A:=[<a,a-1,-b>|<a-1,a,-b>,<b,b,2a-1>] where <> are the column elements of A, a is  a real number defined on [0,1] and b^2=2a(1-a) 

a) to show A is an orthogonal matrix, I understand that I need A.Transpose(A)=Identity(3*3) but is there a way in which I can let a take a random real numbered value between 0 and 1? The rand() only returns an integer within a range. Directly multiplying A and Transpose(A) will return an expression in a, so what's the right approach?

b) from a) we can infer that A is a matrix that describes a rotation in e1,e2,e3 where these are the standard bases vectors in R3. How can I determine the rotation axis? The hint I've been given says I need to consider the Eigenvalues and eigen vectors but I don't quite understand how.

I have the function:   f(x,y) = 1/(sqrt(2*Pi)) * e-1/2(x^2+y^2)

I need to take the total derivative of this function in maple, but I don't know the syntax.

When plotting a continous function that looks something like a square wave, for example like this:

f:=x->piecewise(0<x<Pi,0,Pi<x<2*Pi,Pi);
a:=0: b:=2*Pi: p:=b-a:
fp:=f(x-floor( (x-a)/p)*p);
plot(fp,x=-6*Pi..6*Pi,discont=true);

Is there some way to show dashed vertical lines at the points of discontinuity?

So i got a procedure test, she is kind of numeric, i whant to optimaze test([.5, .5, .5], 1, 3, 100, 100, true, [x, 0, 0, 0, 0])=0 by x. But optinization substitutes x like a symbol, i tryed all methods but they all do the same.

f := proc (x) options operator, arrow; abs(test([.5, .5, .5], 1, 3, 100, 100, true, [x, 0, 0, 0, 0])-.4) end proc; Minimize(f(x));
%;
Error, (in test) cannot determine if this expression is true or false: 0 < -43.0+100*x


Can i some how use optinization on such procedure?

file link  - >    primset.mw

A created an overly complicated worksheet thaI can no longer open.  It's about 17 Mb, has several interactive plots and equations in it.  Is there a way to force Maple to open a worksheet without executing it?

(Lesson learned:  split this up into separate worksheets next time.)

I wish to use closed Newton-Cotes with n=2, also known as Simpson's Rule to numerically integrate an improper integral.

 

If it matters the integrand is (cos(2x))/(x^1/3), integrating between x=0..1

I've tried a few different (but similar) code but to no avail. Here is some stuff I've tried:

 

1.

 

with(Student[NumericalAnalysis]):

with(Student[Calculus 1]):

Simp1 := ApproximateInt(cos(2*x)/x^(1/3), x = 0 .. 1, method = newtoncotes[2]);

 

This gives me an output message that says "Float(infinity)".

 

2.

with(Student[NumericalAnalysis]):

with(Student[Calculus 1]):

Simp2 := int(exp(-x)/sqrt(1-x), x = 0 .. 1);

 

This doesn't have Simpson's rule as an option.

 

I think I'm on the right track with my first try, since I guess it wasn't tecnically an error message, but I'm not sure how to alter the code accordingly to get a numerical value instead. Thanks for any help.

 

 

 

 

 

 

I am trying to numerically double integrate x^2+sqrt(y), with the bounds y=0..x and x=1..1.5.

Then I tried the following code:

 

int(int(x^2+sqrt(y),method=trapezoid,y=0..x),method=trapezoid,x=1..1.5);

 

I know how to write the code if instead of a 'x' in my upper limit for my integral, I had a real number, but I'm not sure how to remedy to code in order make it work. Any help would be appreciated. Thanks!

 

 

restart

with(ODETools):

eqn1 := ((diff(f4(r), r))*r-f4(r)*f1(r)+f4(r))/(f4(r)*r^2) = 0

((diff(f4(r), r))*r-f4(r)*f1(r)+f4(r))/(f4(r)*r^2) = 0

(1)

eqn4 := f4(r)*(r*(diff(f1(r), r))+f1(r)^2-f1(r))/(f1(r)^2*r^2) = 2*m*Dirac(r)*f4(r)/r^2

f4(r)*(r*(diff(f1(r), r))+f1(r)^2-f1(r))/(f1(r)^2*r^2) = 2*m*Dirac(r)*f4(r)/r^2

(2)

dsolve({eqn1, eqn4})

[{-(2*Dirac(r)*(diff(f4(r), r))^2*m*r^2+4*Dirac(r)*(diff(f4(r), r))*f4(r)*m*r+2*Dirac(r)*f4(r)^2*m-f4(r)*(diff(diff(f4(r), r), r))*r^2-2*(diff(f4(r), r))*r*f4(r))/f4(r) = 0}, {f1(r) = ((diff(f4(r), r))*r+f4(r))/f4(r)}]

(3)

``

When I try to solve this system of ODE, Maple does not factor out f4(r) in eqn4.  How do I get Maple to solve eqn4? So that I can get the correct result for f1(r) below:

 

dsolve((r*(diff(f1(r), r))+f1(r)^2-f1(r))/(f1(r)^2*r^2) = 2*m*Dirac(r)/r^2)

f1(r) = -r/(2*m*Heaviside(r)-_C1-r)

(4)

``

Thanks.

Download dsolve_question.mw

Hi,

I got the Real and Imaginary of an expression J1 

assume(d,real):

Gamma:=0.04:tau:=10*Pi:j:=0:

J1:=(exp((1-I*d)*Gamma*tau)-1)/((1-I*d));

J1mod:=simplify((Re(J1))^2+(Im(J1))^2): (I works here this amont is real)

################

but when I change the expression  for J1 to be

J1:=((2*e^(-2^(-j-1)*(1-I*d))-e^(-2^(-j)*(1-I*d))-1)*exp((1-I*d)*Gamma*tau)-1)/((1-I*d)):

J1mod:=simplify((Re(J1))^2+(Im(J1))^2): 

J1mod here is complex(I dont know why? it doesnt separate the real and the im )

Any comments will help

Thanks

Hello everybody,

 

can somebody tell me how to use subscripts in textmode? 

 

Thanks for your help!

 

Picard

OK, what am I doing wrong here?

This polynomial can be factored by almost anyone who knows algebra:

factor(x^2+y^2+2*xy);

but Maple refuses:

 x2  + y2  + 2 xy

but if I pose the question this way:

ans := expand((x+y)^2);

factor(ans);

(x + y)2

I get the expected result.  What is wrong with how I am using the factor?

If we have a piecewise continous 2*Pi-periodic function

h(t)=e^(2*t) when 0 < t < 2*Pi

How can we plot it? It should look something like this:

 

Periodic plot

 

I.e. I want to be able to just set an interval and then it automatically plots the function with the specified periodicity.

First 1315 1316 1317 1318 1319 1320 1321 Last Page 1317 of 2434