Designing Physics Problems with Mathematica

We envision utilizing the versatility of a Computer Algebra System, specifi-cally Mathematica to explore designing physics problems. As a focused project, we consider for instance a thermo-mechanical-physics problem showing its development from the ground up. Following the objectives of this investiga-tion first by applying the fundamentals of physics principles we solve the problem symbolically. Applying the solution we investigate the sensitivities of the quantities of interest for various scenarios generating feasible numeric parameters. Although a physics problem is investigated, the proposed methodol-ogy may as well be applied to other scientific fields. The codes needed for this particular project are included enabling the interested reader to duplicate the results, extend and modify them as needed to explore various extended scenarios.


Introduction
The problem poses as a thermo-mechanical. It inherits both features; the thermodynamic side embodies a confined gas in a cylindrical vessel with a mobile piston; the mechanical side is a flexible spring. For the sake of simplicity, the gas and the spring both are considered ideal. Figure 1 shows the setup of the problem.
A μ mole of the gas within the vessel of base area A and initial height of y at temperature T 1 generates pressure P 1 . In this version, we consider a massless piston. The alternate version may include a massive piston. The named parameters may be adjusted to counterbalance the atmospheric pressure P 0 . The piston is connected to a spring. The other end of the spring is tied to the stationary red rod shown in Figure 1. The gas and the spring are subject to the ideal gas equa-tion of state, Boyle's law, and a linear spring, Hooke's law, respectively [1].
This report is composed of three sections. In addition to the Introduction,  [4]. We also embedded an animation code such that the interested reader readily may produce the results graphically. Section 3 is the Conclusions. Here we discuss the achieved goals and propose a modification to extend the future projects.

Procedure
We begin by utilizing the fundamental physics principle applicable to the proposed problem. For an ideal gas, the equation of state is [1], and/or the Maxwell-Boltzmann speed distribution [5] assisting to envision the mobile molecules producing the gas pressure, respectfully. The typical speed of these molecules i.e. the Root-Mean-Square speed is Applying to air assuming being an ideal gas with a molar mass of 28.8 g/mol at mentioned temperature this gives ~510 m/s. For additional detailed C.F. [6]. Increasing the initial temperature to T 2 increases the molecular speeds and the interior pressure causing the spring to compress as shown in Figure 1 by Δy.
Assuming the piston at the end of each incremented temperature is in equilibrium the zero net force yields, where F s is the spring force, subject to Hooke's law F s = kΔy and P 1 , P 2 are the initial and secondary gas pressures at initial and secondary temperatures. Applying Boyle's law for the second stage (1) yields, substituting P 2 from (3) and P 1 from (1) into (2) after simplification yields, ( ) The first and second coefficients of the quadratic Equation (4) as shown (5) only the second root is positive.  For a test drive, we run the positive root of (5) at a typical temperature T 2 = 500 K for a range of stiffness-es, k. One of the objectives of this report is to investigate what is the reasonable range of the parameters conducive to a practical output. Assuming the final temperature is e.g., T 2 = 500 K or any reasonable temperature we consider springs with stiffness 100 1000 k ≤ ≤ N/m. The lower limit corresponds to a semi-soft and the upper limit to a hard spring. The search results are tabulated in Table 1. Table 1 shows as expected the soft spring with the stiffness of k = 100 N/m is compressed more than a hard spring with the stiffness of k = 1000 N/m. Note, the entire calculation of this report is carried out in the MKS units, however, for practical purposes, the compressed lengths are in cm; as shown the compressions are practically reasonable.
For the rest of the computation, we select a stiffness of k = 500 N/m. To stress the thermodynamic aspect of the report we plot the compression length Δy vs. the secondary temperature, T 2 . See Figure 3.
Motivated by the linearity of the shown graph we looked into the functional behavior of (5). The root square of the discriminant is This simplifies the positive root of (5) i.e.

Conclusion
In this report, we show the steps for seeking feasible parameters designing a physics problem conducive to a meaningful outcome that has a mixture of two flavors from two areas of physics; thermodynamics and mechanics. The objective is merely not to solve the proposed problem per se but rather to deduce a systematic solution conducive to exploring the range of numeric parameters to a meaningful practical output. The interested reader may expand on the given problem by for instance considering scenarios such as a massive piston, a non-ideal spring, a non-ideal gas, etc. As such for instance replacing the massless piston with a heavy one (2) modifies as s s F F mg → + , where the added term is the weight of the piston. All the needed codes to investigate the modified version are embedded in bold-face in the report.