Thick-lens approximation
magnetF={{Cos[t],Sin[t]/Sqrt[k]},{-Sqrt[k]Sin[t],Cos[t]}}
magnetF=magnetF/.t->Sqrt[k]l
MatrixForm[magnetF]
(({{Cos[(Sqrt[k]) l], ((Sin[(Sqrt[k]) l])/(Sqrt[k]))}, {-(Sqrt[k]) Sin[(Sqrt[k]) l], Cos[(Sqrt[k]) l]}}))
edgeF={{1,0},{-Tan[η]/ρ,1}}
MatrixForm[edgeF]
(({{1, 0}, {-((Tan[η])/ρ), 1}}))

magnetD={{Cosh[t],Sinh[t]/Sqrt[k]},{Sqrt[k]Sinh[t],Cosh[t]}}
magnetD=magnetD/.t->Sqrt[k]l
MatrixForm[magnetD]
(({{Cosh[(Sqrt[k]) l], ((Sinh[(Sqrt[k]) l])/(Sqrt[k]))}, {(Sqrt[k]) Sinh[(Sqrt[k]) l], Cosh[(Sqrt[k]) l]}}))
edgeD={{1,0},{Tan[η]/ρ,1}}
MatrixForm[edgeD]
(({{1, 0}, {((Tan[η])/ρ), 1}}))
drift={{1,D},{0,1}}
MatrixForm[drift]
(({{1, D}, {0, 1}}))

Injection-horizontal
matrixFh=edgeF.magnetF.driftl/.{k->Kf,l->Lf,η->ηf+(θef-θf),ρ->ρf,Dl->Drf};
matrixDh=magnetD.edgeF/.{k->Kd,l->Ld,η->ηd+θf,ρ->ρd};
matrixDh1=edgeF.magnetD/.{k->Kd,l->Ld,η->ηd+θf,ρ->ρd};
matrixFh1=driftl.magnetF.edgeF/.{k->Kf,l->Lf,η->ηf+(θef-θf),ρ->ρf,Dl->Drf};

TransferH=matrixDh.drift.matrixFh;
TransferH1=matrixFh1.drift.matrixDh1;
TransferHfull=TransferH1.TransferH;
traceH=Tr[TransferHfull];
traceHinj=traceH/.{Kd->Kid+1/ρid^2,Ld->Lid,Kf->Kif+1/ρif^2,Lf->Lif,ρd->ρid,ρf->ρif,θf->θif,D->Di,Dl->Drf};

traceif=2*Cos[cellangleif degrad]//N
Eq1thick=traceHinj-traceif ;

cellangleif>80&&cellangleif<120
Rade>4.4 && Rade<5.4  

Results - charge to mass of 1/2 ion - third order or octupole nonlinear field
Fmagnet :  96.03734465137394`-52.164428674203904` r+11.548333556832139` (r^2)-0.8287665384635899` (r^3)
Dmagnet :  -34.68068693199386`+39.835350482448035` r-12.957887582109144` (r^2)+1.1420764837293909` (r^3)

LOW ENERGY RADIOISOTPE/Cargo scanning

12.819153596411457`+0.00041852226263472403` r+0.07662348963432208` (r^2)+0.0041237731058094695` (r^3)-0.004286594458505877` (r^4)+0.00307977162436332` (r^5)-0.0007446207804617153` (r^6)

From Concept to Engineering to Machine

Title, Organization/Company
Senior Accelerator Scientist, Fermi National Accelerator Laboratory
Chief Scientist, Particle Accelerator Corporation
Current Mathematica, License #L3305-3768
CV attached

Educational Background
B.S. and B.A., University of Texas at Austin, B.S. in B.S. in Physics, B.A. in Plan II Honors Curriculum, magna cum laude, 1977
Ph.D. in Nuclear Physics, University of Texas at Austin, 1984
Thesis topic: “The Elastic and Inelastic Scattering of Pi+ and Pi- from 12C and 14C Measured at 164 MeV,” experiment performed at Los Alamos National Laboratory
Post-doctoral positions at U of New Mexico, worked on Star Wars Neutral Particle Beam Project
Post-doctoral position at Fermi National Accelerator Lab in High Energy Physics
Research Associate position Fermilab Accelerator Division hired by Nobel laureate Leon Lederman, under Helen Edwards (MacArthur Foundation awardee) during Tevatron operation and the discovery of the top quark

Mathematica usage history
In an early stage collaboration with a TRIUMF accelerator physicist,  a Mathematica notebook  was initiated to design advanced fixed-field alternating gradient accelerators initially to solve a simple set of approximate, thin lens optics  equations simultaneously with geometric  orbit equations.  These constraint equations provided physical and field parameters that insured stable machine performance in novel accelerators for  High Energy Physics research (Muon Collider and Neutrino Factory).  The Mathematica notebooks expanded into a powerful new methodology for advanced accelerator design and optimization which has since been applied to innovations in accelerators for radioisotope production including radiopharmaceuticals, cancer therapy, security and cargo scanning, and green energy nuclear power.  The Mathematica scripts evolved over more than a decade, incorporating ever more powerful features unique to Mathematica such as  high-order and complex polynomial field expansions  uniquely embedded in more accurate, thick lens matrix formulations of beam dynamics,  solutions involving transcendental geometric equations, and strategic optimization of machine performance and physical parameters bounded by critical technical specifications.  These Mathematica scripts/notebooks were eventually linked with state of the art accelerator dynamics codes - in particular a powerful interface was developed to the Michigan State University code, COSY INFINITY, which in turn realized rapid optimization with magnet design by interfacing to the code OPERA TOSCA.

Mathematica 5 Era (2006)
1. Linear-field, thin-lens Fixed-Field Alternating Gradient Accelerator Model
	- Set of equations describing machine tunes (stable performance regime) and corresponding geometry
	- Rectangular linear-field gradient (combined-function) magnets
	- Swept tune, 4 acceleration turns
	- HEP physics research and later and Energy Recovery Electron Linac
2. Tune-stabilized Linear-field Fixed Field Alternating Gradient Accelerator
	- Linear edge angle incorporated into optics equations for edge focusing in the presence of a field gradient
	- Sector like gradient magnets 
	- “strong-focusing” cyclotron but with reverse gradient magnets to achieve higher relativistic energies in a compact format
	- Higher energy stable tune performance, 6+ acceleration turns
	- First application medical proton therapy accelerator and Fermilab patent
3.  CBeta Energy Recovery Linac
	- spinoff of EMMA technology
4.  Nonlinear fields - High order field profiles - beyond duodecapole  in Taylor expansion of radial magnetic field profile
	- complete tune stabilization in a highly nonlinear field profile retaining large dynamical performance
	- 9 MeV electron machine design for cargo scanning (patent held by Passport Systems, a MIT spinoff company)
5. First implementation of a quasi-isochronous (CW), constant tune high energy proton accelerator
	- shift to more orthogonal Legendre field expansions for design work as Taylor expansions highly oscillatory at high order
	- conversion to Taylor expansions within Mathematica scripts to implement magnet design
	
Mathematica 9 Era (2009)
6.  Nonlinear Field  profiles confined to isochronous orbits and applied to design a superconducting high-intensity proton accelerator
	- Quasi-isochronous racetrack format developed - highly compact and efficient
	- Transportable high-energy accelerator for  proton interrogation developed for Defense Threat Reduction Agency (DTRA) 
7.  Fully isochronous (CW) and variable-energy proton and ion accelerators for cancer therapy (no degrader unlike cyclotrons)
	- developed field iteration inside Mathematica scripts to discretely and smoothly correct orbits to a 10-5 and higher field precision
8.  High-intensity, light ion accelerators for cargo scanning and radioisotope production

Mathematica 12 Era - the Future
9. Innovative ion machines for national security, radiobiology,  and ion-beam cancer therapy including FLASH radiotherapy
10. The innovative ion FFA accelerator technology has been chosen as the ion technology for the new National Center for Particle Beam Therapy and Research in Texas.

Job / Project History
Accelerator Innovation using Mathematica
Below are listed both design and realized accelerator projects a direct result of the described conceptualized design work in using Mathematica 
1. EMMA  (Electron Model with Many Applications) prototype accelerator built in Daresbury Laboratory, UK
	Cover of Nature Physics
	https://en.wikipedia.org/wiki/EMMA_(accelerator)
	https://www.nature.com/articles/nphys2179

2. Tune Stabilized Linear-field NS FFAG, patent no, US 7,880,146 B2, Feb 1, 2011 (Fermi National Accelerator Lab, the most cited patent in the history of Fermilab by a factor of 3)

3. CBETA project at Cornell:
	https://www.classe.cornell.edu/Research/ERL/CBETA.html 
	BNL’s press release:  https://www.bnl.gov/newsroom/news.php?a=116982

4. Methods and Systems for Confining Charged Particles to a Compact Orbit During Acceleration using a Nonscaling, Fixed-Field Alternating Gradient Magnetic Field, US 8,836,249 B2, Sept, 2014.  (Passport Systems)

5. FFAG09 workshop presentation - Fermi National Accelerator Lab

6.  DTRA design report, “Trade Study and Design of Accelerators for Proton Interrogation,” June, 2011  (redacted copy available)

7.  see http://www.icfa-bd.org/Newsletter76.pdf

8. “Electromagnetic and Engineering Design of a High-Current 15 MeV/u Cyclotron,” is available under the “Early Access” 
This paper appears in: IEEE Transactions on Nuclear Science
On page(s): 0
Print ISSN: 0018-9499
Online ISSN: 1558-1578
Digital Object Identifier: 10.1109/TNS.2021.3072934
AND
Electromagnetic and Engineering Design of a High-Current 15 MeV/u Cyclotron, 10.1109/TNS.2021.3072934
Papers attached

9. Invited Plenary talk, IPAC21, May 24-28, 2021, “Transformative Technology for FLASH Radiation Therapy”

10. I will get permission to release something -this has not been announced publicly yet