MaplePrimes Questions

Some of the Rotation Coefficients are not calculating properly.

Question_about_Ricci_Rotation_Coefficients.mw

 

 

Tried posting responses to a question this evening. Click the question title, hit the "reply" button and enter a phrase like "Clarification" in the Title filed of the reply form, the reply form just disappears. Tried this in Firefox and Chrome - same behaviour. Means I can no longer contribute - has somebody broken something??? Or I have a problem with *all* my browsers

PS not even sure that this post will appear correctly

I have data file with 6 columns:

X Y Z B1 B2 B3

i.e. 3 coordinates (with some step) and values of B-functions at that 3D point. How to make interpolation of these B-functions to have them in arbitrary (x,y,z) point?

Then I need to solve diff equations like this:

x''(s)+f(...)=0

f(...) depends on x,y,z,x',y',z' and B1,B2,B3. How to write this dsolve(...) construction when we have interpolations inside?

Thanks.

I am trying to understand how maple "isprime" algorithm works. But I can't find anywhere what special_primes means.

 

 showstat(isprime);

isprime := proc(n)
local btor, nr, p, r;
   1   if not type(n,'integer') then
   2     if type(n,('complex')('numeric')) then
   3       error "argument must be an integer"
         else
   4       return 'isprime(n)'
         end if
       end if;
   5   if n < 2 then
   6     return false
       elif member(n,isprime:-special_primes) then
   7     return true
       elif igcd(2305567963945518424753102147331756070,n) <> 1 then
   8     return false
       elif n < 10201 then
   9     return true
       elif igcd(8496969489233418110532339909187349965926062586648932736611545426342203893270769390909069477309509137509786917118668028861499333825097682386722983737962963066757674131126736578936440788157186969893730633113066478620448624949257324022627395437363639038752608166758661255956834630697220447512298848222228550062683786342519960225996301315945644470064720696621750477244528915927867113,n) <> 1 then
  10     return false
       elif n < 1018081 then
  11     return true
       else
  12     r := gmp_isprime(n);
  13     if not r or n <= 5000000000 then
  14       return r
         end if;
  15     nr := igcd(408410100000,n-1);
  16     nr := igcd(nr^5,n-1);
  17     r := iquo(n-1,nr);
  18     btor := modp(('power')(2,r),n);
  19     if cyclotest(n,btor,2,r) = false or irem(nr,3) = 0 and cyclotest(n,btor,3,r) = false or irem(nr,5) = 0 and cyclotest(n,btor,5,r) = false or irem(nr,7) = 0 and cyclotest(n,btor,7,r) = false then
  20       return false
         end if;
  21     if isqrt(n)^2 = n then
  22       return false
         end if;
  23     for p from 3 while numtheory:-jacobi(p^2-4,n) <> -1 do
  24       NULL
         end do;
  25     return evalb(TraceModQF(p,n+1,n) = [2, p])
       end if
end proc

I have a big file (~30Mb) with a single algebraic expression (file contains only one string of the form `expr := a*b + ... :` ). I would like to import this expression into Maple and I use `read` function for that:

    read "s.maple":

I wait for 2 hours, but Maple does not response and no any output provided. Is there any special function for import such data?

I use console Maple18 Linux x86 64.

 

Update. All goes fine in Maple 16, so the issue is relevant for Maple17 and Maple18.

Can somebody help me on this problem?

``

restart

y := x^2-x*(2*cos(theta)-m^2+m^2*((4*1^2*cos(1)^2*(1^2*cos(1)^2))*1^2*cos(1)^2*(1^2*cos(1)^2))/(epsilon*((1^2*cos(1)^2*(1^2*cos(1)^2))*(1^2*cos(1)^2+1^2*cos(1)^2)+(1^2*cos(1)^2*(1^2*cos(1)^2))*(1^2*cos(1)^2+1^2*cos(1)^2))))+1;

x^2-x*(2*cos(theta)-m^2+m^2*cos(1)^2/epsilon)+1

(1)

subs(m = 1-exp(-m), %);

x^2-x*(2*cos(theta)-(1-exp(-m))^2+(1-exp(-m))^2*cos(1)^2/epsilon)+1

(2)

subs(m = 0.1e-2, %);

x^2-x*(2*cos(theta)-(1-exp(-0.1e-2))^2+(1-exp(-0.1e-2))^2*cos(1)^2/epsilon)+1

(3)

subs(epsilon = .85214520, %);

x^2-x*(2*cos(theta)-0.9990006498e-6+0.1172336182e-5*cos(1)^2)+1

(4)

subs(theta = 2*Pi, %);

x^2-x*(2*cos(2*Pi)-0.9990006498e-6+0.1172336182e-5*cos(1)^2)+1

(5)

ans := solve(%, x);

.9999996716-0.8104096482e-3*I, .9999996716+0.8104096482e-3*I

(6)

m := ans[1];

.9999996716-0.8104096482e-3*I

(7)

n := ans[2];

.9999996716+0.8104096482e-3*I

(8)

with(plots):

complexplot({r1, r2}, numpoints = 100, color = green, filled = true, title = "Stability Region")

Error, (in plots/complexplot) invalid arguments

 

``

``


Download erni_stability_try.mw

PLEASE HELP ME. I NEED HELP REALLY BAD.

Restrict calculation to real numbers.

Using y' = u, express the oscillator equation: y" + 3y' + 2y = cos(t) as a first order system. 

Plot an approximate solution curve for the specified initial conditions.

[x0=5, y0=1],[x0=-2, y0=-4],[x0=0, y0=.1],

This is what i have so far but i am not sure if its correct.

Eulers modified method: 

with(RealDomain);

x[0] := 0;

y[0] := 5;

t[0]=0

h := .1;

for n to 100 do

x[n] := x[n-1]+h*(x[n-1]+y[n-1]);

k1 := x[n-1]+y[n-1];

k2 := h*k1+x[n]+y[n-1];

k := 1/2*(k1+k2);

y[n] := h*k+y[n-1]

end do;


data := [seq([x[n], y[n]], n = 0 .. 100)];
G1 := plot(data, style = point, color = "blue");
G1;

Hi,

I want to write a proc to calculate exponential averages. Each call will add one data point to the averge. To do that, I need to store the previous average. I can do that by handing the previous average back to the proc at the next call, but I'd rather store it in the proc. Is there a way to guarantee that a variable---once set---remains alive keeping the last value upon entering the proc again? Note that I need the variable to be local to each instance of the proc since I will have several of these running in parallel (I intend to create these procs using the module factory scheme outlined in the programming guide). So I cannot store the previous average in a global variable since that would not be unique to a given instance.

Any ideas out there?

TIA,

Mac Dude

 

  1. Work with the function 

f(x) = 5x^2-125/x^2-16

  1. Find the horizontal asymptotes
  2. Draw the graph of the function.  Show all horizontal and vertical asymptotes on your graph.  Edit the domain and the range to get a “good window” that clearly shows the shape of the function and all the important features, such as zeros, intercepts, maxima and minima, horizontal and vertical asymptotes. 
 when i  input  bellow

                

  • Maple can output

                  

 

 

i want to find the stability of this equation, but there is seem to have some problems..can somebody help me..

 

y := A*(1/x+x*exp(-2*sqrt(-1)*b))+4*(exp(h)-1)^2*(2*exp(-sqrt(-1)*b)-3*(exp(h)-1)^2*x^(-exp(h)+1)*exp(sqrt(-1)*b*(-exp(h)+1-1))+3*x^(-exp(h)+1)*exp(sqrt(-1)*b*(-exp(h)+1-1)))/(3*(1-r))-exp(-2*sqrt(-1)*b)/x-x;

subs(A = (1+r)/(1-r), %);

subs(r = (1/3)*(exp(h)-1)^2, %);

subs(b = m*Pi*(exp(h)-1), %);

subs(m = 1, %);

subs(h = 0.5e-1, %);

> ans := solve(%, x);
Warning, solutions may have been lost
ans:=

> r1 := ans[1];
Error, invalid subscript selector
> r2 := ans[2];
Error, invalid subscript selector

Any suggestions (or perhaps related examples?) illustrating how I might numerically solve for f(t) in the following non-linear integral equation?  In Fortran, I would start with a guess f(t)=T0, and then search in the neighborhood for a minimum (in the error), but I am not familiar with numerical searches and methods in Maple.  Thank you for any suggestions or leads.

(a,b,... etc are all real)


T__0 := 298.

`&Delta;T` := 25.

0 < beta and beta <= 1

``

f*t = T[0]+`&Delta;T`*[1-exp(-a(int(exp(-b/f(y)), y = y[1] .. t))^beta)]

NULL


Download Integraleqn.mw

 

 

 

Hello, I am newbie in Maple...

I tried to make a simple iteration, and I would like to get complex results for Z2, Z4 and Z5, as they have complex tag in them.

Would anybody to be so kind, to have a look at my file, and tell me, what's the mistake?
zernike_BB.mw

Thank you:

Attila

How can I call to an external batch file (which is located in a given directory) from a Maple session?

Thanks,

Janos Pinter

 

Hi all,

I would like to know how could I plot an ODE for 3 values of a parameter in the same figure.

sol:=dsolve(dsys,numeric,parameters=[t]);

p:=proc(t)sol(parameters=[t]); plots:-odeplot(sol,[x,f(x)],-1..0,_rest) end proc;

p(-1); p(-0.5); p(-0.1);

Here, I have 3 figures one for each value. I used with(plots): display(p(-1); p(-0.5); p(-0.1)). But doesn't work.

Thanks for your help.

 

First 1285 1286 1287 1288 1289 1290 1291 Last Page 1287 of 2434