Newton-galerkin method for non-linear differential equation

1 view (last 30 days)
Hi
I want to implement the newton galerking method in order to solve the equation c(0)=1 & .I know there might be a built in function in matlab but I want to build my own code. The problem is that I am stuck in discretization of the equation for the R and J matrix(J δu=-R). I analyze c in quadratic basis functions , c=. The R must be nnx x 1 in dimensions in order to solve the system with newton iterative method but if I substitute c the R discretization has terms with i and also j so the matrix should be nnx x nnx in dimensions right?But thats impossible cause the R must have only i in discretization. I was used to implementing the galerkin method in linear differential equations where we solve the system Rij=0 and there is no need for initial values and iterative methods but now the R must be a vector not a matrix and I dont know how to deal with that. I know my question is a result of not fully undestanding the method. Any answer would help.
DISCRETIZATION: Ri=
J=
  7 Comments
christos d
christos d on 26 Jun 2020
Edited: christos d on 26 Jun 2020
Yeahp it worked perfectly mr J Alex Lee. I calculated the derivative in each element somewhere in between(ξ=0.25 for input in basis functions) ,cause at the start or at the end of each element basis functions are not differentiable, using the solutions I got and the results are pretty much values that i expected so it must be right. It appears that derivative calculation is an easy task as soon as you create the code for the solution of equation.Thanks again for your help sir!

Sign in to comment.

Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!