Mathematica Asked on June 25, 2021
Consider the differential equation
$$f”[x]==a f[x]$$
The result is a combination of trigonometric or hyperbolic functions, something like:
f=Function[{x},C[1]Cos[Sqrt[a]x]+C[2]Sin[Sqrt[a]x]
how do I separate the two functions Cos
and Sin
?
Try
C[1] Cos[Sqrt[a] x] + C[2] Sin[Sqrt[a] x] /. Plus -> List
(*{C[1] Cos[Sqrt[a] x], C[2] Sin[Sqrt[a] x]}*)
Correct answer by Ulrich Neumann on June 25, 2021
sol = DSolve[f''[x] == a f[x], f, x]
f[x] /. First@sol /. C[1] -> 0
f[x] /. First@sol /. C[2] -> 0
Answered by cvgmt on June 25, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP