## error in dsolve.....

I have a problem for converging dsolve?

"matrix is singular" and '"initial Newton iteration is not converging"'

thanks

 >
 >
 >
 (1)
 >
 (2)
 >
 (3)
 >
 >

 >
 (4)
 >
 (5)
 >
 >
 >
 >

## Need Numerical solutions of system of ODEs...

Dear friends!

Hope you would be fine. I want to solve the following system of ODEs

restart; L := 1; with(plots); Digits := 30;

a[1] := 0; a[2] := 1; a[3] := 2; a[4] := .2; a[5] := 4; a[6] := 6;

S := 1; Pr := 6.2; a := 1; a1 := 1; a2 := 1; lambda := 1; delta := 1; Bi := 1; A := 1; B := 1;

HA := [a[1], a[2], a[3]];

Eq1 := diff(F(eta), eta, eta, eta)+a*(a1*((F(eta)+G(eta))*(diff(F(eta), eta, eta))-(diff(F(eta), eta))^2)-M1*(diff(F(eta), eta))) = 0;

Eq2 := diff(G(eta), eta, eta, eta)+a*(a1*((F(eta)+G(eta))*(diff(G(eta), eta, eta))-(diff(G(eta), eta))^2)-M1*(diff(G(eta), eta))) = 0;

Eq3 := (A+B)*(diff(H(eta), eta, eta))+a2*Pr*(F(eta)+G(eta))*(diff(H(eta), eta)) = 0;

IC1 := F(0)+G(0)=0, (D(F))(0) = 1+delta*((D@@2)(F))(0), (D(G))(0) = lambda+delta*((D@@2)(G))(0), (D(H))(0) = -Bi*(1-H(0)), (D(F))(L) = 0, (D(G))(L) = 0, H(L) = 0;

params := {B111 = .2};
associated with the above (mentioned as red) boundary conditions. The problem which I faced in first condition i.e., F(0)+G(0)=0 because its combine condition for F(eta) and G(eta) which should be use for both function. The rest part of my program is below:

for k to nops(HA) do;

P || k := plots:-odeplot(dsolve(eval({Eq1, Eq2, Eq3, IC1}, `union`(params, {M1 = .5, phi = HA[k]})), numeric), [[eta, diff(F(eta), eta)]], linestyle = [solid, solid, solid, solid][k], color = [red, green, blue, red][k], labels = [eta, f], thickness = 3) end do;

f1 := plots:-display(P || (1 .. nops(HA)));

display(f1, axes = boxed, size = [380, 310], title = "Ethylene glycol/Cu: M = 2, S = -5", titlefont = ["Arial", 12, bold]);

Please fix my problem ASAP. I also attach the maple file. Thanks in advance.

Help.mw

## Error, (in dsolve/numeric/bvp) cannot determine a ...

Can anyone help me with this problem. I am trying to solve it and its given me an error message "Error, (in dsolve/numeric/bvp) cannot determine a suitable initial profile, please specify an approximate initial solution".

 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 (1)
 >
 >
 >

Looking forward to your favorable response.

Kind regard

## A new and efficient code in Maple for Boundary...

Maple

A new code based on higher derivative method has been implemented in Maple. A sample code is given below and explained. Because of the symbolic nature of Maple, this method works very well for a wide range of BVP problems.

The code solves BVPs written in the first order form dy/dx = f (Maple’s dsolve numeric converts general BVPs to this form and solves).

The code can handle unknown parameters in the model if sufficient boundary conditions are provided.

This code has been tested from Maple 8 to Maple 2017. For Digits:=15 or less, this code works in all of the Maple versions tested.

Most problems can be solved with Digits:=15 with atol = 1e-10 or so. This code can be used to get a tolerance value of 1e-20 or any high precision as needed by changing the number of Digits accordingly. This may be needed if the original variables are not properly sacled. With arbitrarily high Digits, the code fails in Maple 18 or later version, etc because Maple does not support SparseDirect Solver at high precision in some of the versions (hopefuly this bug can be removed in the future versions).

For simple problems, Maple’s dsolve/numeric is superior to the code developed as it is implemented in hardware floats. For large scale problems and stiff problems, the method developed is much more superior to Maple and comparable to (and often times better than) state of the art codes for BVPs - bvp4c (MATLAB), COLSYS,TWPBVP, etc.

The code, as written, cannot be used for problems with a singularity at end points (doable in the future). In addition, mixed boundary conditions are not supported in this version of the code (for example, y1(1)=y2(0)). Future updates will include the application of this approach for DAE-BVPs, currently not supported by Maple’s dsolve/numeric command.

A paper has been submitted to JCAM. I welcome feedback on the code and solicit input from Mapleprimes members if they are able to test (and break this code) for any BVP.

PDF of the paper submitted, example maple code and the solver as a text file needed are uploaded here. Additional examples are hosted on my website at http://depts.washington.edu/maple/HDM.html

 >

##################################################################################

Troesch's problem
This is an inherently unstable, difficult, nonlinear, two-point BVP formulated by Weibel and Troesch that describes the confinement of a place column by radiation pressure. Increasing epsilon increases the stiffness of the ODE.
1. E.S. Weibel, On the confinement of a plasma by magnetostatic fields, Phys. Fluids. 2 (1959) 52-56.
2. B. Troesch, A simple approach to a sensitive two-point boundary value problem, J. Comput. Phys. 21 (1976) 279-290.

Introduction
The package HDM solves boundary value problems (BVPs) using higher derivative methods (HDM) in Maple®. We explain how to solve BVPs using this package. HDM can numerically solve BVPs of ordinary differential equations (ODEs) of the form shown is the fowllowing example.

###################################################################################

 >
 >

Reset the program to clear the memory from previous execution command.

 > restart:
 >

Read the txt file which contains the HDM solver for BVPs.

 >

Declare the precision for the entire Maple® sheet.

 > Digits:=15;
 (1)
 >

Enter the first-order ODEs into EqODEs list.

 > EqODEs:=[diff(y1(x),x)=y2(x),diff(y2(x),x)=epsilon*sinh(epsilon*y1(x))];
 (2)
 >

Define the left boundary condition (bc1), and the right boundary condition (bc2). One should collect all the terms in one side.

 > bc1:=evalf([y1(x)]);
 (3)
 > bc2:=evalf([y1(x)-1]);
 (4)
 >

Define the range (bc1 to bc2) of this BVP.

 > Range:=[0.,1.];
 (5)
 >

List any known parameters in the list.

 > pars:=[epsilon=2];
 (6)
 >

List any unknown parameters in the list. When there is no unknown parameter, use [ ].

 > unknownpars:=[];
 (7)
 >

Define the initial derivative in nder (default is 5 for 10th order) and the number of the nodes in nele (default is 10 and distributed evenly across the range provided by the user). The code adapts to increase the order. For many problems, 10th order method with 10 elements are sufficient.

 > nder:=5;nele:=10;
 (8)
 >

Define the absolute and relative tolerance for the local error. The error calculation is done based on the norm of both the 9th and 10th order simulation results.

 > atol:=1e-6;rtol:=atol/100;
 (9)
 >

Call HDMadapt procedure, input all the information entered above and save the solution in sol. HDMadapt procedure does not need the initial guess for the mesh.

 >

Present some details of the solution.

 > sol[4]; # final derivative
 (10)
 > sol[5]; # Maximum local RMSE
 (11)
 >

Store the dimension of the solution (after adjusting the mesh) to NN.

 > NN:=nops(sol[3])+1;
 (12)
 >

Plot the interested variable (the ath ODE variable will be sol[1][i+NN*(a-1)] )

 > node:=nops(EqODEs); odevars:=select(type,map(op,map(lhs,EqODEs)),'function');
 (13)
 > xx:=Vector(NN):
 > xx[1]:=Range[1]:
 > for i from 1 to nops(sol[3]) do xx[i+1]:=xx[i]+sol[3][i]: od:
 > for j from 1 to node do   plot([seq([xx[i],rhs(sol[1][i+NN*(j-1)])],i=1..NN)],axes=boxed,labels=[x,odevars[j]],style=point); end do;
 >

## "unable to convert to an explicit first-order syst...

hi... I have a problem with dsolve.

"unable to convert to an explicit first-order system"

thanks

## Diff. Equation with boundary...

Hey. I have the following Diff. Equation:

diffeq := diff(y(t),t,t,t,t)+10*diff(y(t),t,t)+169*y(t)=0

and I have the conditions y(0) = 0, y'(0) = 1, and y(t) -> 0 for t -> infinity

I know how to do with the first two conditions, but how do you do it with a boundary? I've read the posts made earlier on here, but I can't seem to figure it out. I've tried:

dsolve({diffeq,y(0)=0,D(y)(0)=1,D(y)(infinity)=0},y(t))

Returns nothing.

Any help would be appreciated.

## suggestion on faster solving set of nonlinear ODEs...

#first_question :how can i solve set of nonlinear ODEs,faster or using any packages ?
#second_question :what can be some boundary conditions for this type of nonlinear ODEs? how many BCs are required for this set of nonlinear ODEs? ( to use numeric solution)

 > restart:with(DEtools):with(DifferentialAlgebra):
 > eq[1]:=diff(N(r),r\$2)+2/r*diff(N(r),r)+diff(phi(r),r)/phi(r)*diff(N(r),r)-mu^2/(32*phi(r))*N(r);
 (1)
 > eq[2]:=diff(phi(r),r\$2)+2/r*diff(phi(r),r)-1/2*diff(phi(r),r)^2/phi(r)-8*diff(N(r),r)^2/(omega*(1-2*G*M/r))*phi(r);
 (2)
 > dsolve({eq[1],eq[2]});

## How to solve BVP with singularities?...

Dear friends,

I have to solve the BVP of the following type:

(x-1)*y''(x)+y'(x)=1+x, y(0)=1, y(1)=1

Expressing the highest derivative (y''(x)), we get a singularity at x=1.

So, as recommended, the method bvp[middefer] (or bvp[midrich]) is used:

`dsolve({(x-1)*diff(y(x), x\$2)+diff(y(x),x) = 1+x, y(0)=0, y(1)=1}, type = numeric, method = bvp[middefer], y(x), 'output' = Array([seq(k/10, k=0..10)]), 'abserr'=1.0e-3, 'maxmesh'=100)`

Maple generates the following error:

Error, (in dsolve/numeric/bvp) unable to achieve requested accuracy of 0.10e-2 with maximum 100 point mesh (was able to get 0.82e3), consider increasing `maxmesh` or using larger `abserr`
But as I increase maxmesh, the achievable accuracy (reported in "(was able to get XXX)") decreases:

for

maxmesh = 200: 0.19e4

maxmesh = 500: 0.54e4

maxmesh = 1000: 0.12e5

maxmesh = 5000: 0.73e5

and so on.....

How to solve this equation with desirable accurancy and usage of Array as output?

## Error, (in fprintf) number expected for floating p...

hello...i have a problem with this program.

I want to save the result(y,u(y)) in a text or another format file, but I encounter with this error message:

Error, (in fprintf) number expected for floating point formatBVP.mw

restart:

A1:= 5.5:  n:= 0.59:  A2:= 11818.:  h0:= 0.402e-3:
L:= .1:  dpx := -11823.9:  uc:= 0.44e-2:

ODE:= (A3,y)->
(h0^(n+1)*L/sqrt(n)*(A1*exp(sqrt(n)*y/L)-A2*exp(-sqrt(n)*y/L))+dpx*y*h0^(n+1)+A3*(h0)^n)^(1/n)
;

 (1)

ODEINT:= proc(A3)
option remember;
local y;
evalf(Int(ODE(A3,y), y= 0..1, epsilon= 1e-7)) - uc
end proc:

ReINT:= proc(A3x, A3y)
Digits:= 15:
Re(ODEINT(A3x + I*A3y))
end proc:

ImINT:= subs(Re= Im, eval(ReINT)):

Digits:= 7:
a3:= fsolve([ReINT, ImINT]);

 (2)

A3:= Complex(a3[]);

 (3)

Solve as IVP:

Digits:= 15:
sol:= dsolve({diff(u(y),y) = ODE(A3,y), u(0)=0}, numeric, range=0..1,  output=listprocedure):

plots:-odeplot(
sol, [[y, Re(u(y))], [y, Im(u(y))]], y= 0..1,
legend= [real, imag], labels= [y, u(y)]
);

 >

thanks

## boundary conditions...

the program shows that the error please verify it sirprogram11.mw

## How do I solve a set of differential equations in ...

Hi, my dear friend,

i am solving 9 ODE with boundary conditionsNigam.mw

 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >
 (5)
 >
 (6)
 >
 (7)
 >
 (8)
 >
 (9)
 >
 (10)
 >
 (11)
 >
 (12)
 >
 (13)
 >
 (14)
 >
 >

Maple Worksheet - Error

then i got this error

Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging

i dont know where i need to change.. could you help me..

## Numerical solution...

Hi Guyz

I have a problem with a numerical solution.

with the boundary conditions mentioned in the file we want to solve the differential equation numerically and find omega by using the shooting method

numshooting.mw

## differential equation...

i want to solve this equation,

y''(x)=5*exp(-10/y'(x)) on ]0,15[ with y(0)=0,y(15)=2

can any one help me ? thank you

## how do I remove the error "initial Newton iteratio...

Respected member!

 >
 >
 >
 >
 >
 >
 >
 (1)
 >
 (2)
 >
 >