Using Watu quizzes and Latex in WordPress

Many years ago, I modified a JavaScript code to develop online quizzes for Numerical Methods.  An example of that is here – right click to “View Page Source”.

The above quiz is adequate but looks vintage and I am currently in the process of migrating my whole numerical methods site to WordPress.  As part of this migration, I tried to update the JavaScript code to work on WordPress but that turned out to be above my pay grade.

After much searching, I found the WATU quiz plugin and am using it to redevelop the quizzes from scratch with much of the text being cut and paste from old quizzes.

WATU is quite versatile but I faced issues with rendering of the equations.  For that I use the WP-Katex plugin.  Simply put the equations between the  tagname latex in brackets []  followed by /latex in brackets [], and this shortcode works.  I would show an example to illustrate the use of the shortcode, but it gets rendered.  See usage here.

This use of latex shortcode worked well for the question statements in the quiz but when latex shortcode was put in the distractors, equations would show up with weird spacing.  This was resolved quickly by WATU support where they suggested to edit the WATU style.css file.  See for the solution.  It worked.

Now, another Latex issue cropped up when a user would submit a quiz  and it shows the right answers to the user.  The equations written in Latex would not get rendered and instead it would show the linear form of the equations.   Those were resolved by going to general settings in the WATU quizzes and check marking quizzes to not use Ajax.

WATU is a complete solution for posting online quizzes on the web for student practice.  I am not using WATU to collect data or to assign a grade, but these capabilities do exist in WATU.

See the new version of the quiz I created now on WordPress:  Please do not bookmark the quiz as this is a test website and I will be migrating the test website to the original site ( by the time Fall semester starts.  This will create the least disruption to maintain legacy of open course ware.

Reducing ordinary differential equations to state variable matrix form

To be able to solve differential equations numerically, one has to reduce them to a set of first order ordinary differential equations – also called the state variable form.  By writing them in a matrix form, the equations become conducive for programming in languages such as MATLAB.  Here is an example of this reduction to state variable matrix form.

08.05 blog_Page_1

08.05 blog_Page_2

This post is brought to you by



Synergistic Activities on NSF Proposals

The new 2019 NSF proposal guidelines effective February 25, 2019, have a change in how synergistic activities are reported. The change is described as follows.

Chapter II.C.2.f(i)(d), Synergistic Activities, has been revised to specify that a list should include up to five distinct examples that demonstrate the broader impact of the individual’s professional and scholarly activities that focuses on the integration and transfer of knowledge as well as its creation.”

The complete language is as follows.
“A list of up to five examples that demonstrate the broader impact of the individual’s professional and scholarly activities that focuses on the integration and transfer of knowledge as well as its creation. Examples could include, among others: innovations in teaching and training (e.g., development of curricular materials and pedagogical methods); contributions to the science of learning; development and/or refinement of research tools; computation methodologies and algorithms for problem-solving; development of databases to support research and education; broadening the participation of groups underrepresented in STEM; and service to the scientific and engineering community outside of the individual’s immediate organization.”

Well, for submission to an NSF grant due February 28, 2019, I revised my synergistic activities as follows. I want to know if this does or does not follow the guidelines. What would you change? I am having issues with the language of “list”, and “distinct”. Who can one contact at NSF for clarification? This does not seem to be a question for the program manager.

  1. Conducted four workshops on engineering education internationally during a 2018 Fulbright Specialist program at Universiti Teknologi Petronas, Malaysia.  The four topics were flipped classrooms, the scholarship of teaching and learning, massive open online courses, and improving student performance through learning strategies.
  2. Guest Editor, ASEE Advances in Engineering Education, Flipped Classrooms in STEM, 2016.  This special issue consisted of eight papers that showed how to implement and assess flipped classrooms in a variety of settings.
  3. Developed, revised, assessed and refined holistic and customized web-based resources on Numerical Methods ( and corresponding MOOCs on Numerical Methods and Introduction to Matrix Algebra.  The OCW receives 1,000,000+ annual page views, 2,000,000+ annual views of YouTube videos on NumericalMethodsGuy channel, 100,000+ annual views on Numerical Methods Guy blog.
  4. Developed a unique textbook (adopted by 70 universities worldwide) and accompanying software PROMAL for undergraduates on the topic of Mechanics of Composite Materials published in 1997 (first edition) and 2005 (second edition) by CRC Press. This includes continued development of PROMAL – instructional software package for Mechanics of Composite Materials since 1985. More than 80 universities and many self-study students all over the world use PROMAL. The textbook has been translated to Persian and Turkish.
  5. Designed open source software MCTestAnalysis for analyzing and refining multiple-choice tests based on the analytical framework developed by Jorion, et al (2016) used for the validity of concept inventories. The open source software includes results such as item difficulty, item discrimination, Cronbach alpha, model estimation, item characteristic curves, tetrachoric, and scree plots.

Reporting results from prior NSF support when PIs on a proposal were PIs on a recent grant

Most NSF proposals limit you to 15 pages for proposal description, and most of us mortals have a hard time fully communicating our idea within the limit.  So one would like to minimize reporting prior NSF support that is not related to the proposal or count the same prior results description toward several investigators if they have previously worked together on an NSF grant.

The clarification brought here is for reporting results from prior NSF support. Read the requirements here —

The purpose of this section is to assist reviewers in assessing the quality of prior work conducted with prior or current NSF funding. If any PI or co-PI identified on the proposal has received prior NSF support including:

    • an award with an end date in the past five years; or
  • any current funding, including any no-cost extensions,

information on the award is required for each PI and co-PI, regardless of whether the support was directly related to the proposal or not. In cases where the PI or any co-PI has received more than one award (excluding amendments to existing awards), they need only report on the one award that is most closely related to the proposal. Support means salary support, as well as any other funding awarded by NSF, including research, Graduate Research Fellowship, Major Research Instrumentation, conference, equipment, travel, and center awards, etc.

For a proposal recently submitted, I was working with four Co-PIs — let’s call them B, C, D, and E. I will call myself A.

We had worked on a directly related NSF grant in 2013–16 period for which A was the PI, and B and C were Co-PIs. On talking to a NSF official, writing prior-support results description for this grant would only count toward the reporting by one of the three investigators, A, B, or C. So let’s consider it to be counted toward Co-PI B. If PI A or Co-PI C have had other NSF grants as a PI or Co-PI which are current or have been active within the past five years, you will need to report one each for A and C (you cannot game the system if PI A or Co-PI C does not have another grant to report on, while Co-PI B does; each PI or Co-PI has to write prior support description on one grant each, unless a PI or Co-PI has none to report – for an award with an end date in the past five years or any current funding, including any no-cost extensions).

As per the NSF official, you cannot count the same prior-support description for more than one PI/Co-PI.

I got additional advice from my fellow investigator  — if you have an unrelated grant that you need to report under prior support guidelines, do so at the end of the proposal description under the heading of “Other Non-Related Prior NSF-Supported Projects”. Otherwise, it will unnecessarily distract the reviewer.

An FE Math Problem in Analytical Geometry

“The Fundamentals of Engineering (FE) exam is generally the first step in the process of becoming a professional licensed engineer (P.E.). It is designed for recent graduates and students who are close to finishing an undergraduate engineering degree from an EAC/ABET-accredited program” – FE Exam NCEES

For most engineering majors, mathematics is a required part of the examination. Here is a question from analytical geometry.

eqn of circleThis post is brought to you by

One Two, No Test Review

In Spring 2018 for the EML3041 Computational Methods course, I assigned students to write a nursery rhyme on numerical methods using the “one, two, buckle my shoe” prompt.  Here is a sample, and more will be shared in the next few weeks.

The students were given the choice of going anonymous, use only initials or their full name as the byline.  Some opted not to be published while others added the audio version as well.

One, Two
by Cedric Bellard 

One, two,
No test review
Three, four,
Better study before
Five, six,
Taylor series will stick
Seven, eight,
You will differentiate
Nine, ten,
Must remember programming again
Eleven, twelve,
Hours you must delve
Thirteen, fourteen,
Mini-project must be clean
Fifteen, sixteen,
Frq is the routine
Seventeen, eighteen,
Never daydream
Nineteen, twenty,
You will learn plenty!

One, two, buckle my shoe

In Spring 2018 for the EML3041 Computational Methods course, I assigned students to write a nursery rhyme on numerical methods using the “one, two, buckle my shoe” prompt.  Here is a sample, and more will be shared in the next few weeks.

The students were given the choice of going anonymous, use only initials or their full name as the byline.  Some opted not to be published while others added the audio version as well.

One, Two
by Ricardo Z 

One, two,
Approximations I do
Three, four,
Opens math doors
Five, six,
Into the matrix
Seven, eight,
Gaussian eliminate
Nine, ten,
LU decomposition
Eleven, twelve,
Into methods, I delve
Thirteen, fourteen,
The trunnions lean
Fifteen, sixteen,
With engineers, I convene
Seventeen, eighteen,
Errors unforeseen
Nineteen, twenty,
Derivations aplenty

PS. The reference to trunnions is the real-life problem we use in the class for the problem-centered (not problem-based) approach for the whole course.  The problem deals with the assembly of the fulcrum of bascule bridges.

Fulbright Specialist Diary: Day 17 thru 18

Day 17, Tuesday, July 24, 2018

Yes, it was the day to leave Malaysia to go back home.  I checked out from my temporary home of two weeks and took the scenic taxi ride on Highway E1 to the Kuala Lumpur International Airport.

Video: Scenic E1 Highway of Malaysia

I reached the airport at 5 PM local time but my flight was not till 10:50 PM.  Check-in of the luggage was not till 8PM, and it was just part of the waiting and sitting game till I got back to Tampa.  Free WiFi and two charged external batteries were a good way to catch up on the news and read some free downloaded files from the NAE bookstore, including those on research ethics‘, educating engineers in context of new modes of learning, and the 21st-century grand challenges.

Day 18, Wednesday, July 25, 2018

International flights halfway around the world are exhausting to me but with in-flight entertainment and catching uncontrollable Zs, time does fly a little faster than it did in the 1990s on the transpacific flights.  My first leg of the flight ended up in Tokyo and we reached there about 7AM local time.  It was hot outside as well as inside the airport, but a short layover and a random airport security check kept it amusing for a few hours before the second leg to Dallas.


Photo: Route from Kuala Lumpur, Malaysia to Tampa, FL

The flight got a little late to Dallas and my short layover could turn into a missed flight.  It was a scramble to go through immigration to the check-in of my last leg of the flight as there were several agents to help you go through the kiosks but only one agent was present for the final immigration checkout.  The pre-approved TSA check slip did no good at the security gate as it was supposedly not printed on the boarding pass – so shoes out, belt out, computer out, and I finally managed to make it to the gate to the Tampa flight just when they were already boarding.  I closed my exhausted eyes and landing at Tampa was the finish-line in personal endurance.  My spouse was waiting for me, my energy was renewed, and I was ready to be in the driver’s seat to take us home.

I hope you enjoyed this Fulbright specialist diary that I have written for the last two weeks.  Read all the entries of Day 1 through Day 18.  If you want to contact me, just visit for contact information.


Photo: Announcement by USF on becoming a Fulbright Specialist Candidate

Specific project activities completed during grant:

Activities included facilitating four workshops –

  1. flipped learning,
  2. pragmatic strategies for improving cognitive and affective gains of students,
  3. scholarship of teaching and learning, and
  4. history and development of massive open online courses,

giving guest lectures and conduct tutorials in a course of Numerical Methods, teaching a short course on Mechanics of Composite Materials, meeting with individual faculty and administration, and created a tentative plan for the future exchange of students and faculty between UTP and USF.

Most important outcomes of the project:

The most important outcomes were to

  1. reinforce and model evidence-based pedagogy through workshops, classroom instruction and individual meetings with the specialist,
  2. make future collaboration on educational research methods publications, and
  3. plan for a memo of understanding between the two institutions for potential exchange of students and faculty between USF and UTP.


This material is based upon work supported by the Fulbright Specialist Grant and the products of the National Science Foundation Grants numbers 0126793, 0341468, 0717624,  0836981, 0836916, 0836805, 1322586, 1609637.  Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation or the Fulbright Program.

Fulbright Specialist Diary: Day 16

Day 16 – Monday, July 23, 2018

Today, I woke up a little earlier than usual and called my spouse.  I am looking forward to seeing my family in a few days but I will be missing my UTP family as well.  The UTP family has been kind and welcoming to me.  They have given me a different perspective of how an education system works in a young university – they can be nimble and open to new methods.

Photo: Exchanging gifts with the department chair of mechanical engineering, Dr. Puteri, UTP Malaysia

I met with the department chair, Professor Puteri who stays busy with managing a faculty of 57 members.  We had a chat about my stay and the plans for future collaboration.  I was thankful to her and my host for a smooth visit.  Every detail was attended to and that takes time, effort and grace.  We exchanged a few gifts.


Photo: Gifts from UTP Malaysia

Later during the morning, I had a long conversation with a mechanical engineering faculty member who teaches a Heat Transfer course and he was interested in taking his SoTL (scholarship of teaching and learning) work to a higher level – he had already co-presented and co-published semi-flipped classroom work at a conference.  Since he could not make it to the SoTL workshop I facilitated last Monday, we went through the five stages of SoTL and discussed the simple, validated and reliable instruments he can use for classroom surveys.  We touched upon the ethical standards used for SoTL – at UTP, they are not allowed to use different treatments in the same semester to separate groups. I mentioned that I do not commend such comparison groups either. Instead, one can compare two unpaired groups from two semesters; normalize the cognitive gain results with GPA to avoid any differences in incoming students; check that the two groups in the two semesters are similar or not in other demographic parameters (gender, age, and ethnicity) through a chi-square test.

For lunch, my host took me to a student cafeteria to get a feel for yet another place where students go to eat on campus.  There are no meal plans for students; you just pay as you go.  This cafeteria had a wide variety of food available, mainly chicken and fish cooked in various forms.  You choose the food item and quantity, and through some approximate math, the cashier decides how much you pay.  I did not ask how it works as I feel right at home with numerical methods!

In the afternoon, I met with a student who is doing her master’s in mechanical engineering. She was conducting a three-point bending test on a curved beam and was asked how to interpret the results she was getting from strain gages, and the load and displacement data from the universal testing machine.  I will be sending her models for curved beam bending as well as when the loading is high which takes the material beyond the elastic range.  The combination of analytical and experimental models will be quite helpful to her.

Photo: A three-point bending test. Source:

I realize that only a handful of countries require coursework for their graduate programs.  I believe having at least taking eight core classes in a Ph.D. program would be suitable for any student.  Self-study can only do so much good and it would still be of narrow scope.  The thesis is there for the narrow but deep scope of a subject matter, and for learning independent study and research, and life-long learning skills. What do you think?

I got dropped off at the hotel for the last time by the taxi driver who has been transporting me back and forth between the hotel and UTP for two weeks.  Over this time, we have had short but meaningful conversations about life including children, but with lots of pauses on both our parts, as he was mildly fluent in English and my knowledge of Malay was near “kosong” (zero)!


This material is based upon work supported by the Fulbright Specialist Grant and the products of the National Science Foundation Grants# 0126793, 0341468, 0717624,  0836981, 0836916, 0836805, 1322586, 1609637.  Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation or the Fulbright Program.

Fulbright Specialist Diary: Day 14-15

Day 14 – Saturday, July 21, 2018

A day to wake up a little late but not too late.  I worked on editing a paper that my colleague and I are writing on comparing flipped classroom with and without adaptive learning for the pre-class work.  She writes so well that it made my job easy.  I mentioned a few edits, made some comments and send it back to her.

In the afternoon, my host and his wife take me to Ipoh for lunch.  We end up in an Indian restaurant as I had missed Indian food for a while.  They drop me off in the evening when I continue to work on this blog.  It is also time to call my mom in India and then my family later in the evening.


Photo: Tandoor Grill restaurant in Ipoh, Malaysia

Day 15 – Sunday, July 22, 2018

After taking a shower, I decided to go for a walk around the hotel early in the morning.  I must have walked a few times around the block – the roads are empty, the shops were closed except for the ubiquitous restaurants, laundromats, and a 24-hour medical clinic.  Somehow, after eating a sumptuous breakfast, I fell asleep while watching TV.  There are only nine channels on the TV, and two of them are generous with English programs.  However, the same episode of shows of Blue Blood, NCIS Los Angeles, American Ninja Warrior, and Quantico are repeated several times in the day and then in the following days of the week as well.  I can now recall whole episodes including the commercials that entice you to see them.

For lunch, my host takes me back to Ipoh to try another good Indian restaurant. Among the dishes we ordered, we had his native Andhra fish curry and my native Kashmiri Naan.  To tell you frankly and sheepishly, I had never eaten the latter in my life.  I asked my mom about it and she was surprised as well – it must be an item that is served only in restaurants and going to restaurants in Kashmir was a rare affair when I was growing up.