11"""
22wronskian_second_order_de.py
3- A symbolic and numerical exploration of the Wronskian for second-order linear differential equations.
3+ A symbolic and numerical exploration of the Wronskian
4+ for second-order linear differential equations.
45
56This program:
671. Takes coefficients (a, b, c) for a*y'' + b*y' + c*y = 0.
@@ -65,12 +66,14 @@ def classify_solution_type(root1: complex, root2: complex) -> str:
6566 return "Distinct Real Roots"
6667
6768
69+ from typing import Callable
70+
6871def compute_wronskian (
6972 function_1 : Callable [[float ], float ],
7073 function_2 : Callable [[float ], float ],
7174 derivative_1 : Callable [[float ], float ],
7275 derivative_2 : Callable [[float ], float ],
73- evaluation_point : float ,
76+ evaluation_point : float
7477) -> float :
7578 """
7679 Compute the Wronskian of two functions at a given point.
@@ -85,9 +88,8 @@ def compute_wronskian(
8588 Returns:
8689 float: Value of the Wronskian at the given point.
8790 """
88- return function_1 (evaluation_point ) * derivative_2 (evaluation_point ) - function_2 (
89- evaluation_point
90- ) * derivative_1 (evaluation_point )
91+ return function_1 (evaluation_point ) * derivative_2 (evaluation_point ) - \
92+ function_2 (evaluation_point ) * derivative_1 (evaluation_point )
9193
9294
9395def construct_general_solution (root1 : complex , root2 : complex ) -> str :
@@ -153,3 +155,4 @@ def main() -> None:
153155
154156if __name__ == "__main__" :
155157 main () # doctest: +SKIP
158+
0 commit comments