MaplePrimes Questions

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,

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

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

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

 

 

 

 

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??!!!!!!!!!!!!

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);

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 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.

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:

 

 

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)

 

=         

 

 

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

 

Thanks

Calor

Hello everybody,

While doing a document about quantum mechanics, I stumble on this strange behaviour.

>with(ScientificConstants);
>GetConstant(a[0]);
>GetValue(a[0])

Error message:

Error, (in ScientificConstants:-GetValue) `a[0]` is not a scientific constant object

But in the Assistant Scientific Constant, the value is there: 5.291772e-11m

Why is it not directly available like I did the first time?

Thank you in advance for your help.

 

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

Hello,

I would like to ask if one can divide the maple worksheet (mw) to multiple files like series of command. It could be simillar to include in C++. I have found only save and read command but they can be use only for variables or they can be use in other way ? 

Thank you for any possible solution,

vidocq

want to write in maple code

to generate all commutative diagram 

with adjacency matrix

 

however, i only know a -> b, b-> c , a->d , d-> c

google no information about all commutative diagram, 

 

another problem is

would like to enrich theory , however, do not know how to connect property such as equations with diagram

Hello!

I am trying to write the following function in maple:

f(P(x)) = (x-1)*P'(x)-x*P(1) 

Where P(x) = 1 + x + x^2 

 

My approach thus far has yielded limited results; i am able to get some, but not all, of the results expected.

This is my code,( the relevant bits ):

p := x-> 1+x+x^2

f:= P -> (x-1)*P'(x)-x*P(1); 

if i then type f(1); in maple i get the expected result of -x

if however i type f(x) i get an equation that is unable to produce the expected result when simplified - seemingly, it doesn't parse for maple. The expected result would be -1 

Using unapply make's no difference. Either i have made a mistake typing in my functions - in which case i would like an ëxplanation as to what i did wrong, or seemingly there is a different approach here? Perhaps solving this problem with maple is simply not doable? - anyway my line of reasoning leads me to finally ask how i write a function within a function in this nice program :) 

Any help in this matter is greatly appreciated - i only just recently started using this program. 

I have the following d.e.:

I need to change the s variable into a different one, where the new variable is defined by

(the old s shows up in the limit of the integral)

I tried dchange, but it chokes on this as I don't have an explicit representation of s in terms of Theta.

(I know the overall solution as other people smarter than me have solved this a long time ago, but I 'd like to have the derivation to understand it).

Mac Dude

Let A and B be matrices of dimensions 3,2 and 2,3 corresondingly. It is
known Multiply(A,B)=Matrix([[8, 2, -2], [2, 5, 4], [-2, 4, 5]])


 What is Multiply(B,A)?

First 1443 1444 1445 1446 1447 1448 1449 Last Page 1445 of 2434