83 const std::shared_ptr<SymbolicExpr>& y1,
84 const std::shared_ptr<SymbolicExpr>& y2,
85 const std::shared_ptr<SymbolicExpr>& g,
90 (
context).limits().max_ast_nodes,
"transform");
96 auto term1 = SymbolicExpr::multiply(y1, y2_prime);
97 auto term2 = SymbolicExpr::multiply(y2, y1_prime);
98 auto W = SymbolicExpr::add(term1,
99 SymbolicExpr::multiply(SymbolicExpr::number(-1), term2));
104 W, SymbolicExpr::number(1),
context, trig_options);
105 if (!unit_wronskian) {
108 if (std::holds_alternative<ProvedZeroResidual>(
109 unit_wronskian.value())) {
110 W = SymbolicExpr::number(1);
118 auto u1_prime = SymbolicExpr::divide(
119 SymbolicExpr::multiply(SymbolicExpr::number(-1),
120 SymbolicExpr::multiply(y2, g)),
125 auto u2_prime = SymbolicExpr::divide(
126 SymbolicExpr::multiply(y1, g),
141 auto u1 = std::make_shared<SymbolicExpr>(
142 std::move(u1_value.value()));
143 auto u2 = std::make_shared<SymbolicExpr>(
144 std::move(u2_value.value()));
147 auto y_p = SymbolicExpr::add(
148 SymbolicExpr::multiply(u1, y1),
149 SymbolicExpr::multiply(u2, y2));
156}
catch (
const CasError& error) {
158}
catch (
const std::bad_alloc&) {
160}
catch (
const std::length_error& error) {
162}
catch (
const std::exception& error) {
Result< void > validate_ode_three_expr_one_var(const std::shared_ptr< SymbolicExpr > &first, const std::shared_ptr< SymbolicExpr > &second, const std::shared_ptr< SymbolicExpr > &third, const std::string &x, ComputationContext &context, const std::string &operation)
ODESolutionResult solve_variation_of_parameters_checked(const std::shared_ptr< SymbolicExpr > &y1, const std::shared_ptr< SymbolicExpr > &y2, const std::shared_ptr< SymbolicExpr > &g, const std::string &x, ComputationContext &context)
static ODESolutionResult solve_variation_of_parameters_core(const std::shared_ptr< SymbolicExpr > &y1, const std::shared_ptr< SymbolicExpr > &y2, const std::shared_ptr< SymbolicExpr > &g, const std::string &x, ComputationContext &context)