Group Abstract Group Abstract

Message Boards Message Boards

[WSG23] Daily Study Group: Wolfram for Mathematics Research and Study

Posted 2 years ago
POSTED BY: Arben Kalziqi
74 Replies
POSTED BY: Michael O'Connor

Hi Mike—please check out my answer in the thread for the current Study Group: https://community.wolfram.com/groups/-/m/t/2972173

POSTED BY: Arben Kalziqi
Posted 2 years ago
POSTED BY: Phil Earnhardt

Hey Phil—that's a totally reasonable solution to that problem, yes. The only issue is that the autograder used there is quite a complicated object, and it doesn't always get everything right. (For quizzes and other assessments, we try to update it whenever we find one of these false negatives, but it's not always possible.)

I thought that Counts[StringContainsQ[StringTake[WordList[], 1], "q"]][True] might be taken a little bit better, but no dice :)

POSTED BY: Arben Kalziqi
Posted 2 years ago
POSTED BY: Phil Earnhardt
Posted 2 years ago

Arben, Thanks for your description of the quiz festivities. I wonder how Wolfram knows to calculate the grade on the download file if it isn't via a live wire. I used your manual copy from my downloaded quiz to the one I thought was the real thing, and neither saved my answers. Bob

POSTED BY: Robert Lyons
Posted 2 years ago

Hi, Arben! I very much appreciate the work that you and your Wolfram colleagues put into this class --and all the other classes I've taken. You make it fun to work on and learn even the most complex topics.

I have some questions about the admin of the final quiz. I downloaded my own copy of the quiz, and I left the original in my collection of web artifacts. I filled in the answers and got an automatic grade for the test. I saved the test back to the collection of web artifacts, but when I open it, it's blank. Did the quiz results make it to you, and where can I find my filled in copy of the quiz? Thanks for a great course! Bob

POSTED BY: Robert Lyons

Hi Robert—thanks for your kind words! I think that the giest of what Phil said is correct—probably you ought to submit the quiz directly online. Let me know if that doesn't work, and we'll look into it!

POSTED BY: Arben Kalziqi
POSTED BY: Carl Hahn
Posted 2 years ago
POSTED BY: Phil Earnhardt
POSTED BY: Arben Kalziqi
Posted 2 years ago

Great course! Thanks, Arben & Co.
But there may still be a bug in the use of a quiz by itself without a framework showing overall progress. I took it on Saturday and got 89% correct (16 correct out of 18). It said I could take it again if I wanted but also didn't confirm I had now passed the quiz. Even without the framework, it should not leave the student in the dark in respect to passing the exam. The same issue happened a few weeks ago in another Wolfram-U course. (I am running MacOS 12.6.6 & Safari 16.5.)

POSTED BY: John Davidson
POSTED BY: Arben Kalziqi
Posted 2 years ago
POSTED BY: Phil Earnhardt
Posted 2 years ago
POSTED BY: Phil Earnhardt

Yep, I get you! How about this? (It's been a long time since I've heard or thought about Larmour frequencies, so let me know if this is not right.)

POSTED BY: Arben Kalziqi

Thank you Arben. Great study of simple physics. I could not do it, but know I know how.

Really enjoyed the study group. Re-learned a lot I had forgotten and many new capabilities I never knew before. The quiz is fun too. Looking forward to a next time.

Larry

POSTED BY: Laurence Bloxham

Thanks Larry; I'm glad it was helpful! hopefully it paves a path forward for you to analyze and visualize other systems. I'm happy that we were able to to introduce and re-introduce you to various functionality, too!

POSTED BY: Arben Kalziqi
Posted 2 years ago
POSTED BY: Phil Earnhardt
Posted 2 years ago
POSTED BY: Peter Fedkiw
Posted 2 years ago
POSTED BY: Peter Fedkiw

Hi Peter—there's no issue, it's just a warning that the notebooks were made in a newer version so there might be some functionality that doesn't work because it doesn't exist in your installation.

POSTED BY: Arben Kalziqi
Posted 2 years ago

When I open the "Linear Algebra ..." notebook (and others that generate the same error message), the only page that appears in the notebook is the title page. There is no other content in the notebook (well, at least that I can see). BTW .... What version was used to create the "Linear Algebra ..." notebook?

POSTED BY: Peter Fedkiw

That would have been created on 13.3, probably. We should have set this in the notebooks we uploaded, but looks like we missed this—that notebook is in slideshow view. Just go to Format -> Screen Environment and change that to Working, and it'll become a scrollable notebook rather than a presentation notebook.

POSTED BY: Arben Kalziqi
POSTED BY: Arben Kalziqi
POSTED BY: Laurence Bloxham
POSTED BY: Arben Kalziqi

Help me with the 2d Hamiltonian: H[q1,q1,p1,p1,t]. q1'=dH/dp1, q2'=dH/dp2, p1'=-dH/dq1, p2'=-dH/dq2 all partial derivatives. Hspace i R^2d+1.

POSTED BY: Laurence Bloxham

Thank you for your help. A Hamiltonian for a particle moving in a plane experiencing a magnetic field orthogonal to the planes is: H[q1,q2,p1,p2]= 1/2m (p1-Bq2)^2 +p2^2.

Seek solution to Hamilton's equations and the general solutions for the trajectory of the particle.

POSTED BY: Laurence Bloxham
POSTED BY: Arben Kalziqi

I am trying to describe the dynamics of a particle confined to the plane. There is no q1 dependence. The trajectories should be circles in the plane with the Larmour frequency. Hope I am making sense. Thanks again.

POSTED BY: Laurence Bloxham
POSTED BY: Allison Byars
Posted 2 years ago
POSTED BY: José Dordá
POSTED BY: Arben Kalziqi
Posted 2 years ago
POSTED BY: Phil Earnhardt
Posted 2 years ago
POSTED BY: Dave Middleton
POSTED BY: Ahmed Elbanna
POSTED BY: Arben Kalziqi

Hi, this is an admin Q.: Thanks for the great series! I have not been receiving any of the links to the session recordings (or even email reminders). Who should I contact to correct this? Thanks!

POSTED BY: Claude Pelletier
Posted 2 years ago

Send an e-mail to wolfram-u@wolfram.com with any administrative questions.

[Not an admin, but I know the answer to this one!]

POSTED BY: Phil Earnhardt

Phil is right! We did have an issue with another user's email address on BigMarker's end for some reason, so maybe the same thing is happening to you. We're looking into it!

EDIT: Actually, this was fxed during the minute I typed this post. You should be good to go now.

POSTED BY: Arben Kalziqi

Thanks!

POSTED BY: Claude Pelletier
POSTED BY: Cassidy Hinkle

Great thanks!

POSTED BY: Claude Pelletier

Regarding f[ ]: I like the consistent use of [ ] and not using ( ) for functions, or indiscriminately. I think one problem at least in elementary mathematics is our overuse of ( ) in different contexts, which confuses beginning students (and sometimes even seasoned mathematicians). So using [ ] for functions, { } for domains, and ( ) for only grouping actually makes the language of mathematics better.

I'm glad you think so! I agree that it's nice to reduce ambiguity in this way; it's been helpful to my students in the past as well (who would often get confused by notation when learning about vectors, for example).

POSTED BY: Arben Kalziqi
Posted 2 years ago

My brain gets lost in bracket hell with deeply nested [[],[[],[[]]],[[]]] even when they are nicely indented. I find that using postfix operations makes these expressions much easier to understand. E.g.

Of the first 1000 primes which ones have a digit sum that is also prime?

Select[Map[Total, AssociationMap[IntegerDigits, Prime[Range[1000]]]], PrimeQ]

Range[1000] // Prime // AssociationMap[IntegerDigits/*Total] // Select[PrimeQ]

To understand the first one you have to work from inside to out. The second one maps naturally to the question in left-to-right, easy to read, and understand order.

POSTED BY: Rohit Namjoshi
POSTED BY: John McNally
Posted 2 years ago
POSTED BY: Phil Earnhardt

Thanks for the hint regarding the HP41C clone! There are of course downloadable Apps that do (all or mostly) the same for less on your i-phone, but there is something magical about holding an HP41C calculator in your hand and not using your cell phone... I did a lot of solid RF Systems Engineering on my HP 41C before PCs and spreadsheets. I may just have to order one...

POSTED BY: Carl Hahn
POSTED BY: Arben Kalziqi
Posted 2 years ago
POSTED BY: Peter Fedkiw
POSTED BY: Devendra Kapadia

Hi everybody—today's "homework" question:

Part 1:

Use PrimePi and SparseArray's ability to specify elements via patterns to generate the following (10x10) matrix:

{{1, 2, 0, 0, 0, 0, 0, 0, 0, 0}, {2, 2, 3, 0, 0, 0, 0, 0, 0, 0}, {0, 
  3, 3, 4, 0, 0, 0, 0, 0, 0}, {0, 0, 4, 4, 4, 0, 0, 0, 0, 0}, {0, 0, 
  0, 4, 4, 5, 0, 0, 0, 0}, {0, 0, 0, 0, 5, 5, 6, 0, 0, 0}, {0, 0, 0, 
  0, 0, 6, 6, 6, 0, 0}, {0, 0, 0, 0, 0, 0, 6, 6, 7, 0}, {0, 0, 0, 0, 
  0, 0, 0, 7, 7, 8}, {0, 0, 0, 0, 0, 0, 0, 0, 8, 8}}

sparseViz

Part 2:

Modify the code above such that it produces a 30x30 matrix rather than a 10x10 one, then create a graph which has the result as its adjacency matrix. (Try using a circular embedding for the graph layout.)

POSTED BY: Arben Kalziqi
Posted 2 years ago

A proposed solution to the exercise.

ebook][1]

Attachments:
POSTED BY: José Dordá
POSTED BY: Arben Kalziqi
Posted 2 years ago
POSTED BY: Phil Earnhardt

Terrible pun, Phil, I'm afraid you've gotta get out of here ;). I agree about local documentation; I really prefer it even though we don't bundle it by default anymore since it's gotten so large (though it's easy to download and install anyway). Our publishing guidelines are to link to webdocs, but I was thinking during today's lecture that I might ask to see if we can use local in some contexts, primarily for the reason you mention—click to copy is nice, but "edit and run" is a lot nicer!

Re: the homework problem, Band is a clever thought to have had. I must confirm that the fears you mentioned in chat have come to pass, though, as I generated the SparseArray as follows (and hopefully José sees this too, since it's a reply to the original comment):

sparse = 
 SparseArray[{i_, j_} /; Abs[i - j] <= 1 -> PrimePi[i + j], {10, 10}]

(Fortunately, I think you'll find this elegant enough to forgive me.)

POSTED BY: Arben Kalziqi
Posted 2 years ago

I think it's OK to use Abs to see the "distance" from the diagonal. OTOH, your code ends of applying that test to every cell (or, at least, the calculated value of the coordinates of every cell) in the matrix. You're doing a bunch of superfluous computation; it should be slower:

I'm gonna give that a No Pass.

POSTED BY: Phil Earnhardt

Ha! But the question explicitly specifies the dimensions, so unless you're an incredibly fast typist, mine is still faster in the real world (and that's still true even in the case of your 11 million times larger array). I'll wag my finger and note that knowing when it's prudent to optimize is just as important as knowing how to optimize. (Contrarily: in a high-level language such as this, being able to think about sources of potential slowdown like you have is an invaluable skill!)

POSTED BY: Arben Kalziqi
Posted 2 years ago
POSTED BY: Dave Middleton

Thanks for letting us know, Dave—there's a strange issue with Community which sometimes occurs where the original username gets removed, and our "default" username in cases like those is Vitaliy's (ostensibly because he's the Director of Community Engagement).

POSTED BY: Arben Kalziqi

Arben, what did you mean by " I agree about local documentation; I really prefer it even though we don't bundle it by default anymore since it's gotten so large (though it's easy to download and install anyway)." I am running 13.0.0. and it seems to me my documentation is local, but I don't remember doing anything special to download it. I am going to upgrade one of these days and that gave me pause. I wouldn't dream of not having the full documentation local and be subject to Internet access. What has changed?

POSTED BY: Carl Hahn
POSTED BY: Arben Kalziqi
Posted 2 years ago

Is it this Arben for the Part 1 code?

Normal@SparseArray[{{i_, j_} /; (Abs[i - j] <= 1) -> 
     PrimePi[i + j]}, {10, 10}] // MatrixForm
POSTED BY: Dave Middleton
Posted 2 years ago
Attachments:
POSTED BY: José Dordá

Yes José, that's basically the idea—the only difference is that I used Abs instead of checking whether it was between ±1. I'll check out your notebook when I have the chance, hopefully today.

POSTED BY: Arben Kalziqi

I am curious about the automated proof system you mentioned on Tuesday. Can it detect statements that are unprovable in the current set of axioms (re: Goedel)? Or is that function not computable (Turing/Kleene) hence not doable by computer?

POSTED BY: John McNally
Posted 2 years ago

In Tuesday's presentation on Special Functions and Visualization, John McNally noted the use of Simplify or FullSimplify but cautioned that FullSimplify can take more time.

Is that really still the case? On modern processors, doesn't FullSimplify simply run fast enough? Do you have a real example where FullSimplify would make a noticeable difference?

POSTED BY: Phil Earnhardt

Hi Phil—hopefully John and Charles were able to answer your question in the webinar chat today. To wit, they mentioned that certain trigonometric simplifications were available via FullSimplify which wouldn't be tried with Simplify, and that this could result in simpler results at the cost of slower speeds. John also mentioned that there are trig-specific simplification functions like TrigExpand which can work several orders of magnitude faster than either of the more general simplification functions.

POSTED BY: Arben Kalziqi
Posted 2 years ago
POSTED BY: Phil Earnhardt

Hi Phil! That's a lovely suggestion; I'll see if I can work it in.

POSTED BY: Arben Kalziqi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard