4855 Reputation

22 Badges

10 years, 215 days

MaplePrimes Activity

These are answers submitted by Christopher2222

If you're in document mode just use F5 to toggle between text and math input or if you're in worksheet mode use # sign to ignore text after it. 

Search the maple application center I remember seeing a document in there about writing maple documents.  Ask google too.

That's a good point.  I'll stick to Maple, I'm biased to it anyways. 

I believe he means unterminated loop.  You're just missing an extra end do in that case. 

You can find some resources at the maplesoft application center:

go here for a complete set of Maple programming lessons.

Also here - maple programming
or here - advanced maple programming

Alternatively, you can go here for some basics ,old but still good.

I believe the two lectures above are related to this interesting course I found Algorithmic number theory and cryptography using maple


Okay finally I found out why it wasn't working.  It was because I had a space between the print and (n,m).

As for my loop breaking out and continuing on, I came up with this.

for m from 1 to 100 do
     for n from 1 to 355 do
          if mod(n*m,355)=0 and n<>355 then print(n,m); break end if
     end do
end do

The n<>355 is just to remove the trivial solutions and I couldn't figure out how to get it working with a counter. 



So I'm experimenting and I do this, nothing happens.  What's wrong with it?

for m from 1 to 5 do
     for n from 1 to 5 do 
          if (n*m)>10 then print (n,m)
     end if
     end do
end do

BTW in your if statement I believe you meant end if. 

Just curious, using my double loop how would I limit my output to show the only the first integer for each n? 

Also how does one put counters in maple loops?  C programming is just a=a+1, not so with maple.  That is if I want to increment a value by 1 each time it cycles in the loop how would I do that? 

Myabe this will help you a little

for m from 1 to 100 do
     for n from 1 to 355 do
          if mod(n*m,355)=0 then print(n,m);
          end if
     end do
end do;

 With m=199 the only answer is n=355 since it's the only integer from 1 to 355 where mod(n*199,355)=0



Or I could simplify your M with



I'm not sure if mathematica is mentioned anywhere in the show but from wikipedia it states "Wolfram Research (the maker of Mathematica) is the chief math consultant, reviewing scripts and providing background mathematics for the show." 

Thanks for the link correction, just take out the www in the address and it will work.  Here's the link: I haven't had a good chance to fully read the links to each of the episodes, they seem to be done fairly well. 

Maybe someone could start a numb3rs blog here at mapleprimes and make worksheets associated to each episode. 

Okay thanks, I thought that's really the only way to do it. 

Sorry to play a little bit of devils advocate but wouldn't double or even triple digit numbers work? 

Something like 6997=7^(9+69) I know it's wrong and is not a solution but just as an example would such a solution exist?

So in order for Maple to return possible solutions I would need to set up a loop to try numbers and then return ones that are true. 






But now I have to substitute those values into a to find the y intercept for each x (ie. subs(c[1],a); etc...) for all the intercepts.  I really don't want to have to do that. 

What I'd like to do is have Maple calculate the x,y intercepts in one step and show them to me.  This is what I've tried and I can't seem to prod it out of Maple. 



solve({a,b});  or solve({a,b},{x,y});

Returns x=RootOf ... and y=RootOf answers.  I try to evalf(%) or allvalues(%)  but I only get one answer


fsolve({a,b}); or fsolve({a,b},{s,y})   gives me another of the intercepts, but doesn't tell me all of them {x=-1.144307303,y=0.4136768823}  

fsolve doens't seem to like multiple equations specified over a range so I can't find all the intercepts using fsolve without having to first combine the equations and finding the roots and then use the subs command. 

So how can I get maple to produce the 4 points of intersection {x=..., y= ...} , {x= ... , y= ...} , {x= .. , y= ... } , {x= .. , y= ... } ?  



This is sort of along the same line of problem. 

a:= y=x^2-10-10*sin(x);



Again only returns one solution, x as a RootOf and y=2 answer.  Using allvalues(%) returns the same answer.  Can't get the other 3 points of intersection with a single command. 

Thanks for all the options.  It seems like using Student[Calculus1] Roots seems to be the best option.

Using fsolve with avoid will still miss some roots if there are more than one root within the range. 

In my opinion I think fsolve should return all roots within a specified range.  Even if I use solve, I get a RootOf answer that I can't seem to coax out the real numbers for the roots. 


-15 + RootOf( -300 cos(_Z) + 3225 - 230 _Z + Z^2)


First 39 40 41 42 43 Page 41 of 43