# MaplePrimes Questions

Search Questions:

## Latest Questions Latest Questions Feed

### how to remove tickmarks from axis...

April 14 2014
1 1

Hello,

can I remove tick marks from axis in plots ?

### animation plots, movies...

April 13 2014
0 0

Hi,

thank for any  help.

I need you help to make a movies ( animation)  according to the index k=1..10.  k is used in Vect_T[k], vector of time to make an animation of the true solution, and it's also used in Matrix(M[..,..,k]), h

True solution:ow can I make a seq of plots for different value of k.

plot3d(True_solution(x,y,Vect_T[k]),x=0..a,y=0..b,axes=boxed,grid= [11,11]);

Analytic solution

plots:-matrixplot(Matrix(M[..,..,k]),axes=boxed,tickmarks= [[1="0", 2=" ", 3=" ", 4=" ", 5=".4", 6=" ", 7=" 0.6", 8=" ", 9=".8", 10=" ", 11="1"],[1="0", 2=" ", 3=" ", 4=" ", 5=".4", 6=" ", 7=" 0.6", 8=" ", 9=".8", 10=" ", 11="1"],default],labels=[x,y,u],axes = boxed);

I tried, this:

S:=seq(plots:-matrixplot(Matrix(M[..,..,i]),labels=[x,y,u],axes = boxed),i=1..10):
plots:-display(S);
But I get only one figure.

also,

I tried

BoxTrue:=Null;
for k from 1 to 10 do
BoxTrue:=BoxTrue, plot3d(True_solution(x,y,Vector_time[k]),x=0..a,y=0..b,axes=boxed,grid= [11,11]): od:
display(BoxTrue, insequence=true);
also, no display

### How can I animate given the lagrangian?...

April 13 2014
1 4

Given the lagrangian from the pendulum physics example on the help page,

or text format.

L := -sin(omega*t-phi(t))*(diff(phi(t), t))*a*l*m*omega+(1/2)*(diff(phi(t), t))^2*l^2*m+cos(phi(t))*g*l*m

### An integral that cause probel with Maple...

April 13 2014
0 5

Hi Everybody.

Doing some calculation in quantum mechanics, I stuble on that integral:

I see immediately that the answer is 1/2.  But Maple 18 cannot give an answer other than a limit that he cannot evaluate.  I even try assumption that p and hbar are realcons.  I get infinity.

Any idea?

```--------------------------------------
Mario Lemelin```
```Maple 18 Ubuntu 13.10 - 64 bitsMaple 18 Win 7 -  64 bits
messagerie : mario.lemelin@cgocable.ca
téléphone :  (819) 376-0987```

April 13 2014
0 2

### Difference in result...

April 13 2014
1 2

Hello,

Can anyone explain to me why there is a difference between:

f := int((A*sin(omega*t+phi)-B*sin(omega*t))^2, t);

and the expanded version:

f := int((A*sin(omega*t)*cos(phi)+A*cos(omega*t)*sin(phi)-B*sin(omega*t))^2, t);

Thanks

### Matrix and parallel computing / multicore...

April 12 2014
0 3

Hi,

Is there any difference between

Matrix(4,5,(K,C)->K+C);

and

Array(1..4,1..5,(K,C)->K+C);

Say if I have a very 'complicated' procedure myfunc(K,C) that takes two options, but it runs all dependently.

Matrix(4,5,(K,C)->myfunc(K,C));

and

Array(1..4,1..5,(K,C)->myfunc(K,C));

Which one is more efficient? The final ouput of each run from myfunc is just a integer value.

The reason I am asking it that i think both runs on a 'single' thread (core) as CPU usage is always very low, around 15-20%.

If I look at the task manager, some cores (threads) arent doing anything.

Is there anyway to speed things up?

Thanks,

### What's up with inttrans[fourier]?...

April 12 2014
0 6

I am trying to get a Fourier transform of a Gaussian:

so I say

and get

The Fouriertransform of a Gaussian is well known and the result I expect is something like

exp(1/2*sigma^2*omega^2)

ignoring normalizations & other factors. I know that I can add functions to inttrans, but I kind-of expected inttrans[fourier] to know how to transform a Gaussian, it is a commonly used transformation. Even if I set phi0 to 0 it does not produce anything useful.

???

Mac Dude

### unable to compute...

April 12 2014
1 1

hello, i'm trying to rewrite the RiemannSum function, it's for my homework,

i wrote the entire fonction, but looks like my function is not evaluated, i don't understand why!!! if anyone could see what's wrong please let me know, thanks. here is  my piece of code, and i also attached the file

> with(Student[Calculus1]);

> with(plots);

> with(plottools);

> f(x):= (1)/(5.6 sqrt(2 Pi))*exp(-((x-169)^( 2 ))/(2(5.6)^(2)));

SR:=proc(a, b, f, n) description "Les sommes de Riemann";  local Delta, x,SR,xetoile, i;  Delta:= (b-a)/(n);  for i from 0 to n by 1 do  x(i):= a + i*Delta;  end do;  for i from 1 to n by 1 do  xetoile(i):= (1)/(4)(x(i) + 3 x(i-1));  end do;  SR := 0;  for i from 1 to n by 1 do  SR := SR + f(xetoile(i))*Delta;  end do;  return SR  end proc;

if i compute the procedure SR(0, 150, f(x), 10), it doesn't give a result

### Linear system, GenerateMatrix, solve, vector solut...

April 12 2014
0 4

Hi.

Please, I need your help, to form and solve a linear system.

1) I want to solve the system (13) using "GenerateMatrix" , the system is   evaluated  at  point x[m]=-a+m*h, m=0..2N , In my code I get  equation (15), ( I think it's okay), I juste use subs, x=x[m].
My function, ph(x) approximate by phi[m]=phi(x[m]).  and I want to compute the vecteur [phi[1], phi[2],...,phi[2*N+1]] is my solution.

2) The nodes, are x[k]=-a+k*h, k=0..2*N;  I want to display these nodes in the x-axis, i write the code with the names of each point, but there is an error.

There is some a mistake in my code maple.

Here, my code.

Fred.mw

### Coeff dosn't work correctly...

April 12 2014
0 1

Hi

coeff dosn't work correctly in maple 17

Here is the code

restart;

E := m1*(diff(x1(t), t, t))+3*k*x1(t)-k*x3(t)-k*x2(t);
coeff(E, x1(t));
Error, unable

the coeff of diff(x1(t),t,t) and x2(t) and x3(t) can be determined and are true, but the coeff of x1(t) can not be determined??!!!!!!!!!!!!

### Polar plot of wavefunction...

April 12 2014
0 1

Hello , Happy weekend ... I need a help on plot of a wavefunction give below , i have made the plot using plot3d in cylindrical coordinate. But what i need now is the Polar plot of it. And it always comes with the code ensure calling sequence is correct.

psi(r,phi):= C[0, .1]*BesselI(4, 2*lambda*exp((1/2*I)*phi))*BesselJ(2, 1/r)+C[1, .1]*BesselI(6, 2*lambda*exp((1/2*I)*phi))*BesselJ(3, 1/r)+ C[2, .1]*BesselI(8, 2*lambda*exp((1/2*I)*phi))*BesselJ(4, 1/r)+ C[3, .1]*BesselI(10, 2*lambda*exp((1/2*I)*phi))*BesselJ(5, 1/r)+ C[4, .1]*BesselI(12,2*lambda*exp((1/2*I)*phi))*BesselJ(6, 1/r)+ C[5, .1]*BesselI(14, 2*lambda*exp((1/2*I)*phi))*BesselJ(7, 1/r)+C[6, .1]*BesselI(16, 2*lambda*exp((1/2*I)*phi))*BesselJ(8, 1/r)+ C[7, .1]*BesselI(18, 2*lambda*exp((1/2*I)*phi))*BesselJ(9, 1/r);

C[0, .1]:= 2.222222222*10^11;  C[1, .1]:=8.333333333*10^18 ; C[2, .1]:=6.250000000*10^26 ; C[3, .1]:= 2.127659574*10^32; C[4, .1]:= 3.125000000*10^43 ; C[5, .1]:=1.639344262*10^52 ; C[6, .1]:=1.408450704*10^61; C[7, .1]:=1.886792453*10^70;

My 1st case:
lambda:=0.1; plot3d(abs(psi(r,phi))^2,phi=0..2*Pi,r=0..5, coords=cylindrical);

2nd case: What i want.

lambda:=0.1; plot(abs(psi(r,phi))^2,r=-0..5, phi= 0..2*Pi, coords = polar);

### how to remove O(x) in taylor for substitution...

April 12 2014
2 2

ex := taylor(exp(x), x = 0, 5);

it can not use with subs(x=1,ex);

how to remove O(x^5) part

### How can I solve...

April 12 2014
1 5

How can I use maple and separation of variables ,solve the wave equation utt=uxx for a string of lengh 4 with u(x,0)=sin (Pi/2 x) e-x . ut(x,0)=0.u(0,t)=0 and u(4,t)=0.

### Solving integral containing unknown values...

April 11 2014
2 1

Is there a way to solve the following integral completely?

int(int(x^2+y^2, y = -sqrt(2*a*x-x^2) .. sqrt(2*a*x-x^2)), x = 0 .. 2*a)

When I try solving that all I get is the following:

$\int_{0}^{2a}(2x^2)\sqrt{2ax-x^2}+\frac{2}{3}(2ax-x^2)^\frac{3}{2}dx$

All is well when I calculate it using polar coordinates though:

int(int(r^3, r = 0 .. 2*a*cos(t)), t = -(1/2)*Pi .. (1/2)*Pi)

=         $\frac{3}{2}a^4\pi$

Why doesn't maple solve the first one completely and is there a way around this?

Thanks

Calor

 1 2 3 4 5 6 7 Last Page 2 of 992
﻿