KonstantinW

220 Reputation

9 Badges

17 years, 248 days
Kharkov, Alaska, United States
PhD in Numerical Optimization

MaplePrimes Activity


These are questions asked by KonstantinW

Dear friends,

maybe, somebody knows how to remove annoying text of the first line of a Code Edit Region when a Region is collapsed.

Here, Region in expanded state:

But after collapsing the first line still remains:

Maple easily solves multi-points problems for an ODE, if the equation can be integrated analytically.

For example, the following 3-points problem  is solvable:

dsolve([diff(y(x), x$3)+diff(y(x), x$2)+y(x)=1, y(0)=0, y(1)=0, y(2)=1], [y(x)]);

But a similar problem cannot be solved numerically.

For example,

dsolve([diff(y(x), x$3)+diff(y(x), x$2)+y(x)=1, y(0)=0, y(1)=0, y(2)=1], [y(x)], type = numeric, 'output' = Array([seq(k/5, k=0..5)]));

generates: Error, (in dsolve/numeric/process_input) boundary conditions specified at too many points: {0, 1, 2}, can only solve two-point boundary value problems

I need to solve a certain number of multi-points problems for ODE systems numerically. Maybe, for this there are some workaround?

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?

Hi, friends

I need to calculate the double integral over a non-rectangular domain.

Say, the domain is the triangle (in red)

When I enter

int(int((x^2+y^2)*`if`((y-x-1/2 <= 0) and (y+2*x-2<=0) and (y+x/2-1/2>=0), 1, 0), x=0..1, numeric = true), y=0..1, numeric = true);

or 

int(int((x^2+y^2)*eval(`if`((y-x-1/2 <= 0) and (y+2*x-2<=0) and (y+x/2-1/2>=0), 1, 0)), x=0..1, numeric = true), y=0..1, numeric = true);

an error occur (Error, (in int) cannot determine if this expression is true or false: y-x <= 1/2 and y+2*x <= 2 and 0 <= y+(1/2)*x-1/2)

For me, it is desirable to write boundary conditions in the int operator itself, not as a separate expession.

 

Dear friend,

please suggest a way for manipulation of derivative of a function symbolically. Assume

Typesetting[Suppress]([f(x)]);
Ex1 :=expand(diff(f(x+y)+x*f(x-y), x)^2)+expand(diff(f(x-y)-y*f(x+y), x)^2);

Result is as needed:

Ex1 := (D(f))(x+y)^2+2*(D(f))(x+y)*f(x-y)+2*(D(f))(x+y)*x*(D(f))(x-y)+f(x-y)^2+2*f(x-y)*x*(D(f))(x-y)+x^2*(D(f))(x-y)^2+(D(f))(x-y)^2-2*(D(f))(x-y)*y*(D(f))(x+y)+y^2*(D(f))(x+y)^2

But later I cannot use D(f) as a function. Expressions

subs((D(f)) = (t -> 1-t), Ex1);
subs(diff(f(x),x) = (t -> 1-t), Ex1);

do not handle it as a function.

1 2 3 4 5 6 Page 2 of 6