- #1
ChrisVer
Gold Member
- 3,378
- 465
I was wondering whether it's possible to write a code in C++ that would be able to solve the Harmonic Oscillator:
[itex] \ddot{x} + \gamma x = F_{external}(t,x)[/itex]
With different [itex]F[/itex] function inputs... I thought about creating a function with if clauses, so for different inputs by the user, the force F would be described by a different function...What do you think?
[itex] \ddot{x} + \gamma x = F_{external}(t,x)[/itex]
With different [itex]F[/itex] function inputs... I thought about creating a function with if clauses, so for different inputs by the user, the force F would be described by a different function...What do you think?