MaplePrimes Questions

Hi,

I tried to write a procedure which performs a differentiation on list elements:

 

list1:= [x^3 , 2x , 3]
list2:= [x^5, 2x^4 , 2x]

 



dList:=proc(a::list, b::list)::list;
    local res::list, i::integer, n::integer; 
    description "add list elements and diff";
    n:=min(nops(a), nops(b)) ;
res:=[seq(0, i=1..n)];
for i from 1 by 1 to n do
     res[i]:=diff(a[i]+b[i],x)
end do;
res;
end proc:


dList(list1,list2)

However the Line:  res[i]:=diff(a[i]+b[i],x)

 

causes the Error: Error, illegal use of an object as a name;

 

Can someone give me a hint how to fix this?

 

Thank you very much.

 

 

I hope you be health and happy :-)

 

Please send me a pdf of Maple 17, I have many problem about Maple 17, and can't ask whole of them here!!!

 

restart:

Xsubs:=X=x*exp(epsilon*alpha[1]);

Ysubs:=Y=y*exp(epsilon*alpha[2]);

psubs := P = p*exp(epsilon*alpha[3])

where P(X,Y) and p(x,y). epsilon, alpha[i], i=1,2,3 are parameters.

how to changeover from p(x,y) to P(X,Y) in the following equation?

Eq:= diff(p,y$2)+diff(p,x)=0;

Cheers!

 

Hello,

 I need help writing a maple code to calculate the normal to the curve X^2-2X at x=1.5

and also display the curve, the tangent, and the normal on the same plot in the range x=[-10,10].

I manage to answer the question, but i am not quite certain if i have written a proper code..please if someone can review my solution and advise me i would really appreciate it....

I also would like to also make visisble the point of tangency at x=1.5 and give description of the figure but i am not sure how to do so...

 

how can i cut and paste the exact code with the images....it seesm that it doesnt allow me to do direct cut and paste so i changed it to 1-D and paste it into this page..

Thank you for your help.. 

 

 

 

 

 

restart;

 

 

    f := proc (x) options operator, arrow; x^2-2*x end proc;

   (D(f))(x);

 

 #Then, the slope of the line tangent to the graph of f(x) at the point with x-coordinate, x=1.5 is,

 

    D(f)*at*x = 1.5; 

   evalf((D(f))(1.5));

 

#The y-coordinate of the point is 

 

  f(x)*at*x = 1.5;

 

   evalf(f(1.5));

 

   showtangent(f(x), x = 1.5, color = [black, purple]);

   plot([f(x), (D(f))(1.5)*(x-1.5)+f(1.5)], x = -10 .. 10, y = -10 .. 10, color = [black, purple]);

 

 

  plot([x^2-2*x, x-1.5-.75, -x+.75], x = -10 .. 10, y = -10 .. 10, color = [black, purple, pink]);

 

 

 

 

 

 

hi, is there a way to change color of the page in Maple 18? in fact I am preparing my lectures using slideshow option and want to change the color instead of the default white.

Hi guys,

       I have the following Lagrange function. 

       (Note :w is the generalized co-cordinate.) 

 

       L := (diff(w(r, t), t, r))*v(r, t)

 

       ( I know

        If L =diff(w(t),t)*v(t)..... I can write EulerLagrange(L,t,w(t) but I dont know how to handle above function)

 

        Thanks in advance!!!

There was a command for torusknot(x,y,z),r,R.  Is it included in Maple 17? The index and help to do not list it.

Is there a newer version of a torus knot?

 

i asked it to show explanations

and got an solution about that, but it doesnt work in my Maple

i wanna know what do i wrong , why it`s not working right

 

I am having issues opening my final year project, it was working an hour ago and now it will not open. When I try to open the file it brings up a box title TEXT FORMAT CHOICE with the options: MAPLE TEXT, PLAIN TEXT, MAPLE INPUT and CANCEL.

This is all my work and I need it to complete my year.

Any help with how I can rectify this would be extremely helpful.

Many thanks

Some maple worksheets are created in other languages (spanish, german, french, russian, etc...) , I attempted to use google translate but it is a paid service.  There are alternate free translators however I can't seem to get any of them working using the URL package. 

I'm trying to send data to http://translation.babylon.com/english/to-spanish/

Using similar code from my previous question with google translate we end up with a huge mess and no embedded translations in the code. 

s := "The quick brown fox jumps over the lazy dog":
result := URL:-Get(StringTools:-FormatMessage("http://translation.babylon.com/english/to-spanish/", s));

Any suggestions?

Hi

When I use below cmmand within conditional statements or proc loops, It dosent work

How can I use a similar command to export plot as an Image with arbitrary format under any circumstances?

plotsetup(bmp, plotoutput = `Pic.bmp`, plotoptions = `height=400,width=400`); NCP; (NCP has a plot structure)

Hi

I am trying to optimize a 39, 1 MATLAB matrix, but cannot seem to get a result beyond a 6, 1 matrix. I am getting "Warning, cannot resolve types, reassigning t##'s type" where t## varies from each time I run it, and can show multiple of these warnings. It also says "Warning, cannot translate list".

 

I found a pretty similar problem posted here earlier, where the user "Carl Love" suggested to replace a command from the original code with

Matlab(
     subsop([-1,1]= J, eval([codegen:-optimize](tmp, tryhard), pow= `^`)),
     output = string, defaulttype = numeric
);

 

I was wondering what exactly this command does? Can I apply it to my code to solve my problem? It yielded a result that looks (on the surface) as an optimized code, but I don't feel completely comfortable using it without being certain.

What I have done is simply to replace Matlab(tmp, optimize) with the suggested code above. My code is attached. Thanks in advance for any help.

OptiMatrix.mw

Hi,

I'm, trying to write a nested loop in maple, but I keep getting the Unterminated Loop error. I'm sure the solution is quite simple, but I haven't been able to find it. Any suggestions would be much appreciated. The loop looks like this:

 

i:=0:
di:=25:
n:=1:  

while (n<=nLimit) do
sol1:=fsolve(eq1, y=i..i+di)
     if type(sol1, numeric) = true then
     lambda(n) :=sol1
     i:=i+di
     n:=n+1
     else  i:=i+di
     end if:
end do:

Just wonder if there is a way to have maplesoft.com not think I'm in Germany. On my computer, iPad, and iPhone the website reverts to German language. My locale is west coast US. And I often search the website to learn more about using Maple. 

It's not a big issue, but if there is a way to have it remember English, I'd like to know.

 

Cheers, all !

hello everyone..

please...

I need help to write a code to calculate the riemann sum approximation of the curve cos(sqrt(x^2+y^2)+1 

calculate the actual volume using integration

use the ranges x=[-2pi to 2pi]=y, and 20 subdivisions.

also display the curve and the parallelepiped approximations on the same plot.

 

Thank you for your help!

First 1301 1302 1303 1304 1305 1306 1307 Last Page 1303 of 2429