To solve the Euler-Lagrange equation I wrote the following problem :

-----------------------------------------------------------------------------------------------------

# -*- coding: utf-8 -*-

from sympy import Symbol, Function, diff
from sympy.calculus.euler import euler_equations
from sympy.solvers.ode import dsolve
from sympy import init_printing

init_printing()

x = Function('x')

t = Symbol('t')

# Intégrande
L = 1 + diff(x(t),t)**2


# Equation d'Euler-Lagrange
eq = euler_equations(L, x(t), t)


# General solution

dsolve(eq[0],x(t))


# Particular solution

dsolve(eq[0], x(t), ics = {x(0): 1, x(1): 2})

-------------------------------------------------------------------------

but sympy do not provides me the particular solution, that is, the result 
with or without the initial conditions is the same. It seems that sympy 
does not take into account the ics provided


-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/f51c1b4e-b175-4c14-a09e-06aa8e63fd64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to