Education

Teaching and learning about math, Maple and MapleSim

Mathematics for Chemistry with Symbolic Computation

J. F. Ogilvie

            This interactive electronic textbook, in the form of Maple worksheets, is released in its sixth edition, 2021 August.  This book has two major divisions, mathematics for chemistry -- the mathematics that any instructor of a course in chemistry would wish a student thereof to understand and to be able to implement, and mathematics of chemistry, in the sense of the classic volumes by Margenau and Murphy -- mathematical treatments of particular topics in chemistry from an introductory post-secondary level to a post-graduate level. The content, which includes not only chapters in previous editions that have been revised but also additional chapters on quantum mechanics, molecular spectrometry and advanced chemical kinetics, has been collected during two decades, with many contributions from other authors, acknowledged in particular locations.  Each chapter includes not only explanatory treatments but also illuminating examples and exercises with chemical applications where practicable.

 

Mathematics for chemistry      0  introduction to Maple commands

                                                 1  numbers, symbols and elementary functions

                                                 2  plotting, geometry, trigonometry and functions

                                                 3  differential calculus

                                                 4  integral calculus

                                                 5  multivariate calculus

                                                 6  linear algebra

                                                 7  differential and integral equations

                                                 8  probability, statistics, regression and optimisation

Mathematics of chemistry       9  chemical equilibrium

                                                10  group theory

                                                11  graph theory

                                                12  quantum mechanics in three parts -- models, atoms and molecules

                                                13  molecular spectrometry

                                                14  Fourier transforms

                                                15  advanced chemical kinetics

                                                16  dielectric and magnetic properties

The content freely available at https://www.maplesoft.com/applications/view.aspx?SID=154267 includes also a published report on teaching mathematics with symbolic software and an interactive periodic chart that yields information about particular chemical elements and their isotopic variants.

            The nature of this electronic interactive textbook makes it applicable with an instructor in a traditional setting, or computer laboratory, for which the material of mathematics for chemistry could be reasonably covered in three or four semesters, but even for self study.  The chapters on quantum mechanics and Fourier transforms are available as separate textbooks in the same format.

We had the exciting opportunity to interview Dr Trefor Bazett, a math professor at the University of Victoria who also regularly posts videos to his YouTube channel explaining a wide variety of math concepts, from cool math facts to full university courses. You may also recognize him from the recent webinar he did on effective interactive learning! If you’re a teacher, and particularly if you’re trying to find ways to keep your students engaged when teaching math online, read on for some great advice and perspective from someone who’s already built a significant online following. If you’re not a teacher, read on anyways! We may not all be teachers, but we’ve all been (or are!) students. And as students, we probably all have some opinions on how things should be taught! Read on for a new perspective, and maybe even some new ways to approach your learning in the future.

A picture of Dr Trefor Bazett with his hand outstretched towards the camera. He is wearing a shirt with the symbol for pi with a rainbow pride flag in the background.

What are some unique challenges presented by teaching math online, and how do you overcome them?

Teaching online I work a lot harder to keep students truly engaged. I’m a big believer in active learning, which means that students are actively taking part in their learning through solving problems, asking questions, and making connections themselves. This might seem a bit strange coming from a YouTuber since watching a video is one of the most passive ways to learn! When it is an in-person class, the social pressures of that environment make it easier to create a supportive learning environment that fosters active engagement. When I teach online, I try to scaffold interactive activities and learning opportunities around my videos, but for me at least it is challenging! I find it easier in many ways to think of the passive components of my teaching like creating a video that introduces a topic but designing learning activities around those videos where students are engaged and feel like they are part of a supportive community is crucial. 

Do you think the experience of teaching online has led to any positive trends in education that will live on once students are back in the classroom?

Absolutely. Whether we wanted to or not, teachers now have experience and skills integrating technology into their learning because so many of us had to figure out how to teach online. The big question is how do we leverage these new technological tools and experiences and resources we have created for when we return to the physical classroom? Can we reincorporate in a new way, for instance, the videos we created for the pandemic? We have so many amazing tech tools – and of course I have to shout out Maple Learn as one of those! – that made it possible for students to engage in interactive learning in the online space, but now we can think about all the ways to leverage these tools in face-to-face learning whether as part of a classroom demo, in-class student activities, or outside-of-class activities.

How do you think the influx of math educators on social media, such as yourself, has changed and will change the shape of math education?

I’m so proud of the math education community on YouTube and other platforms, the quality and diversity of math education online is truly incredible. Having universal access to free high quality education materials can really help level the playing field. But there is still a crucial role to the classroom as well, whether it is in person or online. Just watching YouTube videos on a math channel isn’t going to be enough for most people. You need to be actively practicing math in a supportive environment, receiving feedback on your progress, and getting help when you need it. I feel there is a lot of opportunities for teachers to leverage online materials for instance by linking students to excellent expository content while in class teachers are focusing on designing engaging active learning activities.

What made you decide to create a YouTube channel? Do you have any tips for others wanting to do the same?

My first online course was designed asynchronously and so I needed a place to host the videos for that course. Why not YouTube? I only had twenty students in the course, and never imagined anyone else would actually watch them, let along millions of them! But when I noticed my first math video that got picked up by the YouTube search algorithm and I kept getting comment after comment thanking me I realized there really was a big appetite for quality math education content on YouTube.

My biggest tip is just to get started! Your first video isn’t (probably!) going to be the one that gets picked up by the YouTube algorithm, but it is the one that starts you on that path and builds up your skills at telling math stories, speaking to the camera, using the technology, and so forth.  Don’t worry about that first video being completely perfect or mimicking the “style” of other YouTubers, use it as a chance to build from. If you want to know more about my process for making videos, I share a lot of my process here.

What do you think is the best way for students to approach homework problems?

Homework is often perceived, rather understandably, as a burdensome chore you frustratingly have to do. If that is the perception, then it is also understandable that students would take behaviours that might help them get points on the homework but aren’t very effective for learning. However, if you think about homework as both an opportunity to learn and an opportunity to get feedback on how effective your learning is, now you can engage in much more effective behaviours.

My suggestion is to always genuinely try the problem on your own first. If I’m completely stuck, I really like to write down everything I do know about the problem such as the definitions of the math words involved in the problem. This makes it so much easier to see all the pieces and figure out how to assemble them a bit like a jig-saw puzzle.

I’m a big believer in self-regulated learning, where you are identifying precisely what you know and what you don’t know, and then adapting you learning to zero in on the parts that are challenging. Technology tools like Maple Learn that provide step-by-step solutions to many types of math manipulations can help with this self-regulation, for instance by verifying that you correctly did some cumbersome algebra or precisely where the mistake is at.

Even if you have solved the problem, you can still learn more from it! You can imagine how the instructor could modify that question on a test and if so how would you respond? You can map out how this problem connects to other problems. You can write down a concept map of the larger picture and where this problem fits in it. I have a whole video with a bunch more strategies for approaching homework problems beyond just getting the answer here.

As a teacher, what is your opinion on providing students with step-by-step solutions?

Step-by-step solutions definitely have a role. To master math, you need to master a lot of little details, and then the deeper connections between ideas can start to form. Step-by-step solutions can really help support students mastering all those little details because they can identify the precise location of their confusion as opposed to just noting they got the wrong answer and not be able to identify where exactly their confusion lies. I think they can also help lower math anxiety as students can be confident they will have the tools to understand the problem.

However, it is important to use step-by-step solutions appropriately so that students use them as a supportive learning tool and not a crutch. Sometimes students try to learn math by mimicking the steps of some process without deeply understanding why or when to apply the steps. There can be a big gap between following a solution by someone else and being able to come up with it yourself. This is where teachers have an important role to play. We need to both be clear in our messaging to students about how to use these supports effectively, as well as to consistently be asking formative questions that encourage students to reflect on the mathematics they are doing and provide opportunities for students to creatively solve problems. 

You spoke a bit in your webinar about the “flipped classroom” model. Do you have any tips for educators who want to move more towards a flipped classroom where in-class time is focused on discussion and exploration?

I really love flipped classroom approaches. The big idea here is that students established foundational content knowledge before class, for instance by watching my pre-class videos, so they are empowered to do more collaborative active learning in class. The social supports of class are thus focused on the higher-level learning objectives. However, as much as I love this approach, it is just one of really an entire spectrum of options that start to shift towards student-centered learning. My main tip is to start small, perhaps just adding in one five-minute collaborative problem to each class before jumping all the way to a flipped classroom pedagogy. For myself, it took a few years where I kept adding more and more active learning elements to my classroom and each time I did that I felt it worked so well I added a bit more. One positive consequence from the pandemic-induced shift to online learning is there is now a tremendous amount of high-quality content available for free, so it is easier today to start embracing a fully flipped classroom than it has ever been.

What are some ways teachers can let students take their learning into their own hands?

This is so important. Sometimes teaching can be too paternalistic, but I think we should trust our students more. Give students the time and space to try tackling interesting problems and it will happen! Our role as teachers is to create a supportive learning environment that is conducive to students learning. A few ingredients I think that can help are firstly to encourage students to collaborate and support each other. Mathematics is an inherently collaborative discipline in practice, but this can also be very helpful for learning. Secondly, we can provide effective scaffolding in problems that provide avenues for students to get started and making progress. Thirdly, tech tools like Maple Learn let us take some of the friction away from things like graphing, cumbersome algebra, and other procedural computations meaning we can instead focus our learning on developing conceptual understanding.

In your opinion, how can we motivate students to learn math?

Authenticity. Motivation is sometimes divided between intrinsic motivations (enjoyment of the subject itself) and extrinsic motivations (for instance wanting to get a good grade), and in general we learn more effectively and more deeply when we are intrinsically motivated. To capture intrinsic motivation, I always try to make my teaching and the problems I ask students to work on to feel authentic. That might mean the problem connects to real world challenges where students can see how the math relates to the world, but it doesn’t have to! A problem that stays in pure math but asks and answers interesting mathematical problems and delights the learner is also great for intrinsic motivation. If students are empowered to tackle authentic problems in a supportive learning environment, that motivation will naturally come.

What’s your favourite number, mathematical expression, or math factoid?

Somewhere on the surface of the earth, there is a spot that has the exact same temperature and pressure as the spot exactly opposite it on the other side of the earth. This is true no matter what possible weather patterns you have going on all around the earth! That this has to always be true is due to the Borsuk-Ulam theorem and if you want to know more about this theorem and its many consequences, I’ve done a whole video on it here.

Any parting thoughts?

At the start of every new school year, I read about dozens of cool ideas and am tempted to think “I want to try that!”. I suggest instead finding one thing to improve on the year before, one thing that you can really invest in that will make a difference for your students. You don’t need to reinvent the wheel every year!

This research work demonstrates the use of the MapleSim and Python scientific packages for the correct use of differential equations for engineering students, in the face of the pandemic generated by COVID-19. The main objective is to visualize the teaching and learning process of the subject presented. The methodology used is block diagrams using graphic programming and the one-dimensional symbolic structure. The results are totally optimal since automation was achieved in the differential equations applied to different engineering cases. The applications generated by the scientific software are fully upgradeable and available in the cloud.

Ponencia_CIMAC_2021.pdf

Lenin AC

Ambassador Maple

Calling all teachers! Have you ever sat wracking your brain on how to create an engaging lesson for students who aren’t so keen on math? Are you trying to help your students understand concepts on a deeper level? Well, Dr Trefor Bazett’s webinar “How to Design Effective Interactive Learning Activities” might have the answers you seek. Dr Trefor is professor at the University of Victoria who has risen to fame on the internet with his engaging YouTube math tutorials. He recently gave a great talk sharing some of the things he’s learned about teaching and how he structures his course content to maximize student learning and engagement. We wanted to take the time to highlight a few of the points he made.

One of the things Dr Trefor emphasized in his talk was the concept of active learning. Unusual as it may seem, math is a lot like juggling. You can learn all the theory of juggling and how it’s supposed to work, but when it comes down to it, if you want to learn how to juggle, you have to actually juggle! And as he describes, it’s the same for math. If you want to learn math, you have to actually do math. This means that educators need to find a way to make learning active for their students, and find ways for them to actually explore and use the concepts that are taught in class. There are many ways to approach this, and Dr Trefor has a few ideas in his talk that might help get you started! For example, he discusses a backwards model wherein teachers create their lectures based on the assessments and activities, rather than the other way around. That way, you can be sure that what you’re teaching is what the students need to know in order to complete the activities you’re giving them—and that in turn can make the activities more engaging for the students.

Another idea he talked about that I personally found quite appealing was the idea of incorporating storytelling into your teaching. Stories are always more interesting than just plain lectures. And you don’t even have to weave together a grand epic with elements of math being taught along the way (although that would be pretty cool!). It can be as simple as changing the way you explain a concept. “X is true, but, Y is also true! Therefore…” Doesn’t that seem a little more interesting? By tying together concepts with pseudo-narrative threads using ‘but’s and ‘therefore’s, you can create a lecture that students will want to listen to—after all, they’ll want to know what happens next.

Drawing from some of the science behind learning, Dr Trefor also discussed the idea of cognitive load. This is essentially the amount of stress the student is experiencing when they’re trying to learn. Concepts will always have a certain amount of intrinsic load to them—that is, when you’re trying to learn how to factor a quadratic equation, there’s going to be some amount of stress associated with factoring itself. The part educators can focus on reducing is the extrinsic load, which is the stress caused by outside factors. For example, your factoring lesson may be hindered by having to teach online instead of in-person, or by the fact that you keep thinking 2x3 is 5 (or maybe that’s just me!). Dr Trefor describes how online tools like Maple Learn can help to reduce this extrinsic load. With a way to show and explain a wide variety of concepts without pencil and paper, and to help perform those calculations that are muddying up the underlying concept, you can reduce the cognitive load and help your students learn.

This is just a taste of some of the ideas Dr Trefor talked about in his webinar. If we’ve piqued your interest, you can watch the full thing for yourself here, or by clicking the video below! Be sure to check out Dr Trefor’s channel as well if you want to see his dynamic teaching style in action.

A manipulator, in which 3 degrees of freedom are provided by changing the length of the links and one degree of freedom, is provided by turning. Only 4 degrees of freedom. Solved using Draghilev's method. In one case, the length of the manipulator link could be expressed through the value of the 3rd coordinate. The lengths of the other two links are considered generalized coordinates. In this case, it is still obtained polynomial equations, as for the usual coordinates.
I was asked to make an example of the movement of such a manipulator using Maple. (Automatically, this is an example of solving an inverse kinematics problem.)
four_degrees_of_freedom_from_Sabina.mw

I am happy to announce that registration for Maple Conference 2021, to be held Nov. 2-5, is now open! The event is once again virtual and free this year. On our home page, you can find information about our keynote presentations. Our keynote speakers this year are Dr. Veselin Jungic, Dr. Evelyne Hubert and Dr. Laurent Bernardin.

The Agenda & Event Format page contains preliminary information about the event and will be updated as the agenda develops. This page describes two add-on workshops that are also free of charge: "Maple Programming: Beyond the Basics" and "Advanced Problem Solving with Regular Chains".

You can register for both the conference and the add-on workshops here: Maple Conference 2021. I hope to see you all in November!

In this simple example, we are going to learn how to Plot Isocline & Trajectory to examine stability of a dynamical system with Lyapunov Stability Theorem in Maple.

iso.mw

Download iso.mw

You should be familiar with Dynamical Systems and Linear Control.

This content would be more useful for students who are studying

>> Linear Control &

>> ODE's Theory

I have a linear ctrl course this semester & I was trying to solve such problems. Finally I did.

Hope to enjoy

Using Python and MapleSim versus Basic Science Teaching in Times of Pandemic

Abastract

In the following research work entitled Use of Python and MapleSim against the teaching of Basic Sciences in times of pandemic, due to the social immobility imposed by the government, we saw the need to use scientific software to train our students with modern approaches. The purpose is to raise the learning achievement in the subjects of Mathematics and Physics for engineering. The methodology we used was native syntax programming and graphic component programming. The results that we obtained in modeling and simulation are quite exact, with respect to the traditional results. Finally, all the material can be updated and managed at any time because it is available on maplecloud.

Keywords: Python, MapleSim, modeling, simulation

Ponencia_UNTumbes.pdf

Lenin AC

Ambassador Maple

Over the last few months, we’ve had the honour of working with some fantastic online content creators who share our goals of helping make math accessible to students. We wanted to take a moment to highlight some of the great things they’ve done and how they’ve been able to use Maple Learn and the Maple Calculator to help explain math concepts to their audiences. Whether you’re looking to learn or searching for ways to make math engaging to others, these content creators are worth checking out!

Much as some may complain about “attention spans these days”, there is definitely merit in being able to clearly explain high school level math in under a minute. If you’re looking for tips and tricks to help you understand math concepts, look no further than Justice the Tutor, whose TikTok is full of easy-to-understand videos explaining how to solve a wide variety of problems. You can check out his video on solving systems of equations here.

I think it’s fair to assume that most people reading this like math, but all of us are multi-faceted individuals—so who’s also into drag? Online Kyne is, and she explains tons of math concepts in a fun, engaging, and sparkly way. Check out her video on 3D plots (and her matching 3D-glasses-themed eye makeup) here!

If you’re looking for more ways to have fun with math, check out Tom Rocks Math, run by the University of Oxford’s Dr Tom Crawford. He rose to fame with his “Naked Mathematician” series, but even his clothed videos explain difficult math topics in ways that are clear and accessible. You can see how he tackles a complex topic like partial differentiation here.

Whether you’re looking for a refresher or to learn something new, Dr Trefor Bazett’s YouTube channel has everything from cool math facts to complete courses on calculus, linear algebra, and more. If you don’t mind feeling called out for that one dumb mistake you made on a test once, this video on common algebra mistakes is a great resource for both students and teachers. What’s more, we’re excited to announce that Dr Trefor Bazett will be hosting a Maplesoft webinar where he’ll be discussing how to design effective interactive learning activities! The webinar will be on June 15, and you can sign up here. This promises to be a fascinating talk and a great way to get tips from someone whose online presence exemplifies his skill at getting people to engage with math, so we hope you’ll check it out.

These content creators are just the tip of the iceberg. We’ve also been working with Bobby Seagull, a math teacher and author, and TikTok personalities nerdynas and tamerxi, whose student-centric content is both fun and useful. For our Japanese audiences, you can also check out Kantaro Suzuki’s videos on solving a variety of math problems, and Takumi’s video where he brought in other YouTubers to compete in a puzzle challenge using the Maple Calculator!

We’re so thrilled to see how these amazing content creators are using Maple Learn and the Maple Calculator to create new content and engage with their audiences. It’s very exciting for us to be working with so many people who share our goals of making math accessible and interesting, and we love seeing what they’ve done with our products. Whether you’re a student looking to further understand your courses, a teacher looking to find more ways to engage with your students, or just someone who wants to learn more about math, these videos are all a fantastic resource. It’s clear that all these content creators have a passion for math, and as people who share that passion, we’re so happy to be working with them to help others find their own interest in math.

The deadline to submit a presentation proposal for the Maple Conference 2021, to be held Nov. 2-5, 2021, has been extended to June 13, 2021.

We invite submissions of proposals for presentations on a range of topics related to Maple, including Maple in education, algorithms and software, and applications. All presenters will be given the option of submitting a full paper, which will undergo peer review, and if accepted, be included in the conference proceedings.

More about the themes of the conference, how to submit a presentation proposal, and the program committee can be found here: Call for Presentations.

We hope to see you at Maple Conference 2021!

Some of you know me from my occasional posts on Maple’s typesetting and plotting features, but today, I am here in my new role as co-chair (along with Rob Corless of Western University) of the 2021 Maple Conference. I am pleased to announce that we have just opened the Call for Presentations.

This year’s conference will be held Nov. 2 – Nov. 5, 2021. It will be a free virtual event again this year, making it an excellent opportunity to share your Maple-related work with others without the expenses and inconveniences of travel.

Maple Conference 2021 invites submissions of proposals for presentations on a range of topics related to Maple, including Maple in education, algorithms and software, and applications. All presenters will be given the option of submitting a full paper, which will undergo peer review, and if accepted, be included in the conference proceedings.

Presentation proposals are due June 1, 2021.

You can find more information about the themes of the conference, how to submit a presentation proposal, and the program committee on Maplesoft Conference Call for Presentations.

Registration for attending the conference will open in June. Another announcement will be made at that time.

I sincerely hope that all of you here in the Maple Primes community will consider joining us for this event, whether as a presenter or attendee.

The https://sites.google.com/view/aladjevbookssoft/home site contains free books in English and Russian along with software created under the guidance of the main author prof. V. Aladjev in such areas as general theory of statistics, theory of cellular automata, programming in Maple and Mathematica systems. Each book is archived, including its cover and book block in pdf format. The software with freeware license is designed for Maple and Mathematica.

Yesterday, user @lcz , while responding as a third party to one of my Answers regarding GraphTheory, asked about breadth-first search. So, I decided to write a more-interesting example of it than the relatively simple example that was used in that Answer. I think that this is general enough to be worthy of a Post.

This application generates all maximal paths in a graph that begin with a given vertex. (I'm calling a path maximal if it cannot be extended and remain a path.) This code requires Maple 2019 or later and 1D input. This works for both directed and undirected graphs. Weights, if present. are ignored.

restart:

AllMaximalPaths:= proc(G::GRAPHLN, v)
description 
    "All maximal paths of G starting at v by breadth-first search"
;
option `Author: Carl Love <carl.j.love@gmail.com> 2021-Mar-17`;
uses GT= GraphTheory;
local 
    P:= [rtable([v])], R:= rtable(1..0),
    VL:= GT:-Vertices(G), V:= table(VL=~ [$1..nops(VL)]),
    Departures:= {op}~(GT:-Departures(G))
;
    while nops(P) <> 0 do
        P:= [
            for local p in P do
                local New:= Departures[V[p[-1]]] minus {seq}(p);
                if New={} then R,= [seq](p); next fi;                
                (
                    for local u in New do 
                        local p1:= rtable(p); p1,= u
                    od
                )       
            od
        ]
    od;
    {seq}(R)  
end proc
:
#large example:
GT:= GraphTheory:
K9:= GT:-CompleteGraph(9):
Pa:= CodeTools:-Usage(AllMaximalPaths(K9,1)):
memory used=212.56MiB, alloc change=32.00MiB, 
cpu time=937.00ms, real time=804.00ms, gc time=312.50ms

nops(Pa);
                             40320
#fun example:
P:= GT:-SpecialGraphs:-PetersenGraph():
Pa:= CodeTools:-Usage(AllMaximalPaths(P,1)):
memory used=0.52MiB, alloc change=0 bytes, 
cpu time=0ns, real time=3.00ms, gc time=0ns

nops(Pa);
                               72

Pa[..9]; #sample paths
    {[1, 2, 3, 4, 10, 9, 8, 5], [1, 2, 3, 7, 8, 9, 10, 6], 
      [1, 2, 9, 8, 7, 3, 4, 5], [1, 2, 9, 10, 4, 3, 7, 6], 
      [1, 5, 4, 3, 7, 8, 9, 2], [1, 5, 4, 10, 9, 8, 7, 6], 
      [1, 5, 8, 7, 3, 4, 10, 6], [1, 5, 8, 9, 10, 4, 3, 2], 
      [1, 6, 7, 3, 4, 10, 9, 2]}

Notes on the procedure:

The two dynamic data structures are

  • P: a list of vectors of vertices. Each vector contains a path which we'll attempt to extend.
  • R: a vector of lists of vertices. Each list is a maximal path to be returned.

The static data structures are

  • V: a table mapping vertices (which may be named) to their index numbers.
  • Departures: a list of sets of vertices whose kth set is the possible next vertices from vertex number k.

On each iteration of the outer loop, P is completely reconstructed because each of its entries, a path p, is either determined to be maximal or it's extended. The set New is the vertices that can be appended to the (connected to vertex p[-1]). If New is empty, then p is maximal, and it gets moved to R


The following code constructs an array plot of all the maximal paths in the Petersen graph. I can't post the array plot, but you can see it in the attached worksheet: BreadthFirst.mw

#Do an array plot of each path embedded in the graph:
n:= nops(Pa):
c:= 9: 
plots:-display(
    (PA:= rtable(
        (1..ceil(n/c), 1..c),
        (i,j)-> 
            if (local k:= (i-1)*ceil(n/c) + j) > n then 
                plot(axes= none)
            else 
                GT:-DrawGraph(
                    GT:-HighlightTrail(P, Pa[k], inplace= false), 
                    stylesheet= "legacy", title= typeset(Pa[k])
                )
            fi
    )),
    titlefont= [Times, Bold, 12]
);

#And recast that as an animation so that I can post it:
plots:-display(
    [seq](`$`~(plots:-display~(PA), 5)),
    insequence
); 

 

I am a high school Teacher in Denmark, who have been using Maple since version 12, more than 12 years ago. I suggested it for my school back then and our math faculty finally decided to purchase a school license. We are still there. We have watched Maple improve in a lot of areas (function definitions, context panels, graphically etc., etc ). Often small changes makes a big difference! We have been deligted. We we are mostly interested in improvements in GUI and lower level math, and in animations and quizzes. I have also been enrolled as a beta tester for several years yet. 

One of the areas, which is particually important is print and export to pdf, because Danish students have to turn in their papers/solutions at exams in pdf format! I guess the Scandinavian countries are ahead in this department. They may quite possible be behind in other areas however, but this is how it is. 

Now my point: Maplesoft is lacking terrible behind when regarding screen look in comparison with print/export to pdf. 

I am very frustrated, because I have been pinpointing this problem in several versions of Maple, both on Mapleprimes and in the beta groups. Some time you have corrected it, but it has always been bouncing back again and again! I have come to the opinion that you are not taking it seriously? Why?

Students may loose grades because of missing documentations (marking on graphs etc.). 

I will be reporting yet another instance of this same problem. When will it stop?

Erik

 

Wirtinger Derivatives in Maple 2021

Generally speaking, there are two contexts for differentiating complex functions with respect to complex variables. In the first context, called the classical complex analysis, the derivatives of the complex components ( abs , argument , conjugate , Im , Re , signum ) with respect to complex variables do not exist (do not satisfy the Cauchy-Riemann conditions), with the exception of when they are holomorphic functions. All computer algebra systems implement the complex components in this context, and computationally represent all of abs(z), argument(z), conjugate(z), Im(z), Re(z), signum(z) as functions of z . Then, viewed as functions of z, none of them are analytic, so differentiability becomes an issue.

 

In the second context, first introduced by Poincare (also called Wirtinger calculus), in brief z and its conjugate conjugate(z) are taken as independent variables, and all the six derivatives of the complex components become computable, also with respect to conjugate(z). Technically speaking, Wirtinger calculus permits extending complex differentiation to non-holomorphic functions provided that they are ℝ-differentiable (i.e. differentiable functions of real and imaginary parts, taking f(z) = f(x, y) as a mapping "`&Ropf;`^(2)->`&Ropf;`^()").

 

In simpler terms, this subject is relevant because, in mathematical-physics formulations using paper and pencil, we frequently use Wirtinger calculus automatically. We take z and its conjugate conjugate(z) as independent variables, with that d*conjugate(z)*(1/(d*z)) = 0, d*z*(1/(d*conjugate(z))) = 0, and we compute with the operators "(&PartialD;)/(&PartialD; z)", "(&PartialD;)/(&PartialD; (z))" as partial differential operators that behave as ordinary derivatives. With that, all of abs(z), argument(z), conjugate(z), Im(z), Re(z), signum(z), become differentiable, since they are all expressible as functions of z and conjugate(z).

 

 

Wirtinger derivatives were implemented in Maple 18 , years ago, in the context of the Physics package. There is a setting, Physics:-Setup(wirtingerderivatives), that when set to true - an that is the default value when Physics is loaded - redefines the differentiation rules turning on Wirtinger calculus. The implementation, however, was incomplete, and the subject escaped through the cracks till recently mentioned in this Mapleprimes post.

 

Long intro. This post is to present the completion of Wirtinger calculus in Maple, distributed for everybody using Maple 2021 within the Maplesoft Physics Updates v.929 or newer. Load Physics and set the imaginary unit to be represented by I

 

with(Physics); interface(imaginaryunit = I)

 

The complex components are represented by the computer algebra functions

(FunctionAdvisor(complex_components))(z)

[Im(z), Re(z), abs(z), argument(z), conjugate(z), signum(z)]

(1)

They can all be expressed in terms of z and conjugate(z)

map(proc (u) options operator, arrow; u = convert(u, conjugate) end proc, [Im(z), Re(z), abs(z), argument(z), conjugate(z), signum(z)])

[Im(z) = ((1/2)*I)*(-z+conjugate(z)), Re(z) = (1/2)*z+(1/2)*conjugate(z), abs(z) = (z*conjugate(z))^(1/2), argument(z) = -I*ln(z/(z*conjugate(z))^(1/2)), conjugate(z) = conjugate(z), signum(z) = z/(z*conjugate(z))^(1/2)]

(2)

The main differentiation rules in the context of Wirtinger derivatives, that is, taking z and conjugate(z) as independent variables, are

map(%diff = diff, [Im(z), Re(z), abs(z), argument(z), conjugate(z), signum(z)], z)

[%diff(Im(z), z) = -(1/2)*I, %diff(Re(z), z) = 1/2, %diff(abs(z), z) = (1/2)*conjugate(z)/abs(z), %diff(argument(z), z) = -((1/2)*I)/z, %diff(conjugate(z), z) = 0, %diff(signum(z), z) = (1/2)/abs(z)]

(3)

Since in this context conjugate(z) is taken as - say - a mathematically-atomic variable (the computational representation is still the function conjugate(z)) we can differentiate all the complex components also with respect to  conjugate(z)

map(%diff = diff, [Im(z), Re(z), abs(z), argument(z), conjugate(z), signum(z)], conjugate(z))

[%diff(Im(z), conjugate(z)) = (1/2)*I, %diff(Re(z), conjugate(z)) = 1/2, %diff(abs(z), conjugate(z)) = (1/2)*z/abs(z), %diff(argument(z), conjugate(z)) = ((1/2)*I)*z/abs(z)^2, %diff(conjugate(z), conjugate(z)) = 1, %diff(signum(z), conjugate(z)) = -(1/2)*z^2/abs(z)^3]

(4)

For example, consider the following algebraic expression, starting with conjugate

eq__1 := conjugate(z)+z*conjugate(z)^2

conjugate(z)+z*conjugate(z)^2

(5)

Differentiating this expression with respect to z and conjugate(z) taking them as independent variables, is new, and in this example trivial

(%diff = diff)(eq__1, z)

%diff(conjugate(z)+z*conjugate(z)^2, z) = conjugate(z)^2

(6)

(%diff = diff)(eq__1, conjugate(z))

%diff(conjugate(z)+z*conjugate(z)^2, conjugate(z)) = 1+2*z*conjugate(z)

(7)

Switch to something less trivial, replace conjugate by the real part ReNULL

eq__2 := eval(eq__1, conjugate = Re)

Re(z)+z*Re(z)^2

(8)

To verify results further below, also express eq__2 in terms of conjugate

eq__22 := simplify(convert(eq__2, conjugate), size)

(1/4)*(z^2+z*conjugate(z)+2)*(z+conjugate(z))

(9)

New: differentiate eq__2 with respect to z and  conjugate(z)

(%diff = diff)(eq__2, z)

%diff(Re(z)+z*Re(z)^2, z) = 1/2+Re(z)^2+z*Re(z)

(10)

(%diff = diff)(eq__2, conjugate(z))

%diff(Re(z)+z*Re(z)^2, conjugate(z)) = 1/2+z*Re(z)

(11)

Note these results (10) and (11) are expressed in terms of Re(z), not conjugate(z). Let's compare with the derivative of eq__22 where everything is expressed in terms of z and conjugate(z). Take for instance the derivative with respect to z

(%diff = diff)(eq__22, z)

%diff((1/4)*(z^2+z*conjugate(z)+2)*(z+conjugate(z)), z) = (1/4)*(2*z+conjugate(z))*(z+conjugate(z))+(1/4)*z^2+(1/4)*z*conjugate(z)+1/2

(12)

To verify this result is mathematically equal to (10) expressed in terms of Re(z) take the difference of the right-hand sides

rhs((%diff(Re(z)+z*Re(z)^2, z) = 1/2+Re(z)^2+z*Re(z))-(%diff((1/4)*(z^2+z*conjugate(z)+2)*(z+conjugate(z)), z) = (1/4)*(2*z+conjugate(z))*(z+conjugate(z))+(1/4)*z^2+(1/4)*z*conjugate(z)+1/2)) = 0

Re(z)^2+z*Re(z)-(1/4)*(2*z+conjugate(z))*(z+conjugate(z))-(1/4)*z^2-(1/4)*z*conjugate(z) = 0

(13)

One quick way to verify the value of expressions like this one is to replace z = a+I*b and simplify "assuming" a andNULLb are realNULL

`assuming`([eval(Re(z)^2+z*Re(z)-(1/4)*(2*z+conjugate(z))*(z+conjugate(z))-(1/4)*z^2-(1/4)*z*conjugate(z) = 0, z = a+I*b)], [a::real, b::real])

a^2+(a+I*b)*a-(1/2)*(3*a+I*b)*a-(1/4)*(a+I*b)^2-(1/4)*(a+I*b)*(a-I*b) = 0

(14)

normal(a^2+(a+I*b)*a-(1/2)*(3*a+I*b)*a-(1/4)*(a+I*b)^2-(1/4)*(a+I*b)*(a-I*b) = 0)

0 = 0

(15)

The equivalent differentiation, this time replacing in eq__1 conjugate by abs; construct also the equivalent expression in terms of z and  conjugate(z) for verifying results

eq__3 := eval(eq__1, conjugate = abs)

abs(z)+abs(z)^2*z

(16)

eq__33 := simplify(convert(eq__3, conjugate), size)

(z*conjugate(z))^(1/2)+conjugate(z)*z^2

(17)

Since these two expressions are mathematically equal, their derivatives should be too, and the derivatives of eq__33 can be verified by eye since z and  conjugate(z) are taken as independent variables

(%diff = diff)(eq__3, z)

%diff(abs(z)+abs(z)^2*z, z) = (1/2)*conjugate(z)/abs(z)+z*conjugate(z)+abs(z)^2

(18)

(%diff = diff)(eq__33, z)

%diff((z*conjugate(z))^(1/2)+conjugate(z)*z^2, z) = (1/2)*conjugate(z)/(z*conjugate(z))^(1/2)+2*z*conjugate(z)

(19)

Eq (18) is expressed in terms of abs(z) = abs(z) while (19) is in terms of conjugate(z) = conjugate(z). Comparing as done in (14)

rhs((%diff(abs(z)+abs(z)^2*z, z) = (1/2)*conjugate(z)/abs(z)+z*conjugate(z)+abs(z)^2)-(%diff((z*conjugate(z))^(1/2)+conjugate(z)*z^2, z) = (1/2)*conjugate(z)/(z*conjugate(z))^(1/2)+2*z*conjugate(z))) = 0

(1/2)*conjugate(z)/abs(z)-z*conjugate(z)+abs(z)^2-(1/2)*conjugate(z)/(z*conjugate(z))^(1/2) = 0

(20)

`assuming`([eval((1/2)*conjugate(z)/abs(z)-z*conjugate(z)+abs(z)^2-(1/2)*conjugate(z)/(z*conjugate(z))^(1/2) = 0, z = a+I*b)], [a::real, b::real])

(1/2)*(a-I*b)/(a^2+b^2)^(1/2)-(a+I*b)*(a-I*b)+a^2+b^2-(1/2)*(a-I*b)/((a+I*b)*(a-I*b))^(1/2) = 0

(21)

simplify((1/2)*(a-I*b)/(a^2+b^2)^(1/2)-(a+I*b)*(a-I*b)+a^2+b^2-(1/2)*(a-I*b)/((a+I*b)*(a-I*b))^(1/2) = 0)

0 = 0

(22)

To mention but one not so famliar case, consider the derivative of the sign of a complex number, represented in Maple by signum(z). So our testing expression is

eq__4 := eval(eq__1, conjugate = signum)

signum(z)+z*signum(z)^2

(23)

This expression can also be rewritten in terms of z and  conjugate(z) 

eq__44 := simplify(convert(eq__4, conjugate), size)

z/(z*conjugate(z))^(1/2)+z^2/conjugate(z)

(24)

This time differentiate with respect to conjugate(z),

(%diff = diff)(eq__4, conjugate(z))

%diff(signum(z)+z*signum(z)^2, conjugate(z)) = -(1/2)*z^2/abs(z)^3-z^3*signum(z)/abs(z)^3

(25)

Here again, the differentiation of eq__44, that is expressed entirely in terms of z and  conjugate(z), can be computed by eye

(%diff = diff)(eq__44, conjugate(z))

%diff(z/(z*conjugate(z))^(1/2)+z^2/conjugate(z), conjugate(z)) = -(1/2)*z^2/(z*conjugate(z))^(3/2)-z^2/conjugate(z)^2

(26)

Eq (25) is expressed in terms of abs(z) = abs(z) while (26) is in terms of conjugate(z) = conjugate(z). Comparing as done in (14),

rhs((%diff(signum(z)+z*signum(z)^2, conjugate(z)) = -(1/2)*z^2/abs(z)^3-z^3*signum(z)/abs(z)^3)-(%diff(z/(z*conjugate(z))^(1/2)+z^2/conjugate(z), conjugate(z)) = -(1/2)*z^2/(z*conjugate(z))^(3/2)-z^2/conjugate(z)^2)) = 0

-(1/2)*z^2/abs(z)^3-z^3*signum(z)/abs(z)^3+(1/2)*z^2/(z*conjugate(z))^(3/2)+z^2/conjugate(z)^2 = 0

(27)

`assuming`([eval(-(1/2)*z^2/abs(z)^3-z^3*signum(z)/abs(z)^3+(1/2)*z^2/(z*conjugate(z))^(3/2)+z^2/conjugate(z)^2 = 0, z = a+I*b)], [a::real, b::real])

-(1/2)*(a+I*b)^2/(a^2+b^2)^(3/2)-(a+I*b)^4/(a^2+b^2)^2+(1/2)*(a+I*b)^2/((a+I*b)*(a-I*b))^(3/2)+(a+I*b)^2/(a-I*b)^2 = 0

(28)

simplify(-(1/2)*(a+I*b)^2/(a^2+b^2)^(3/2)-(a+I*b)^4/(a^2+b^2)^2+(1/2)*(a+I*b)^2/((a+I*b)*(a-I*b))^(3/2)+(a+I*b)^2/(a-I*b)^2 = 0)

0 = 0

(29)

NULL


 

Download Wirtinger_Derivatives.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

First 7 8 9 10 11 12 13 Last Page 9 of 55