kinesimario

0 Reputation

2 Badges

13 years, 131 days

MaplePrimes Activity


These are replies submitted by kinesimario

for example, i tried using dsolve in this:

 

restart; with(DEtools); 
with(plots); 
with(linalg);
ode2 := x^2*(diff(y(x), `$`(x, 2)))+x*(diff(y(x), x))+4*y(x) = -2*x+7; 
bc2 := y(1) = 7, y(4) = -1;
a := 1; b := 4;
ic2 := bc2[1], (D(y))(a) = alpha;
constraint := lhs(bc2[2])-rhs(bc2[2]); 
constraint = 0;
a0 := 0; 
y0 := eval(constraint, y(b) = Yb(eval({ic2, ode2}, alpha = a0), y(x), b)); 
a1 := 1; 
y1 := eval(constraint, y(b) = Yb(eval({ic2, ode2}, alpha = a1), y(x), b)); 
while fnormal(y1-y0) <> 0 do 
z := dsolve(y1 = (y1-y0)*(a1-x)/(a1-a0), x); 
a0, a1 := a1, z; 
y0, y1 := y1, eval(constraint, y(b) = Yb(eval({ic2, ode2}, alpha = z), y(x), b))
end do; 
 
it then says:
Error, (in dsolve) found the indeterminate function y with different arguments {y(1), y(x)}
 
please help...thanks...:)

for example, i tried using dsolve in this:

 

restart; with(DEtools); 
with(plots); 
with(linalg);
ode2 := x^2*(diff(y(x), `$`(x, 2)))+x*(diff(y(x), x))+4*y(x) = -2*x+7; 
bc2 := y(1) = 7, y(4) = -1;
a := 1; b := 4;
ic2 := bc2[1], (D(y))(a) = alpha;
constraint := lhs(bc2[2])-rhs(bc2[2]); 
constraint = 0;
a0 := 0; 
y0 := eval(constraint, y(b) = Yb(eval({ic2, ode2}, alpha = a0), y(x), b)); 
a1 := 1; 
y1 := eval(constraint, y(b) = Yb(eval({ic2, ode2}, alpha = a1), y(x), b)); 
while fnormal(y1-y0) <> 0 do 
z := dsolve(y1 = (y1-y0)*(a1-x)/(a1-a0), x); 
a0, a1 := a1, z; 
y0, y1 := y1, eval(constraint, y(b) = Yb(eval({ic2, ode2}, alpha = z), y(x), b))
end do; 
 
it then says:
Error, (in dsolve) found the indeterminate function y with different arguments {y(1), y(x)}
 
please help...thanks...:)

@Preben Alsholm 

I wanted to show a table of values which show t y rosen and y-rosen, i used these codes:

printf(" t y rosen |y-rosen|
relative error\n");
printf("\n");
for i from 0 to 20 do
printf("%4.1f %16.8e % 16.8e %16.8e %16.8e\n",.1*i,Y(.1*
i),eval(y(t),rosen(.1*i)),abs(Y(.1*i)-eval(y(t),rosen(.1*i))),abs
(Y(.1*i)-eval(y(t),rosen(.1*i)))/ Y(.1*i));
od;
 
but then this showed up:
 
Error, (in fprintf) number expected for floating point format
 
what must I do? :)
 

@Preben Alsholm 

I wanted to show a table of values which show t y rosen and y-rosen, i used these codes:

printf(" t y rosen |y-rosen|
relative error\n");
printf("\n");
for i from 0 to 20 do
printf("%4.1f %16.8e % 16.8e %16.8e %16.8e\n",.1*i,Y(.1*
i),eval(y(t),rosen(.1*i)),abs(Y(.1*i)-eval(y(t),rosen(.1*i))),abs
(Y(.1*i)-eval(y(t),rosen(.1*i)))/ Y(.1*i));
od;
 
but then this showed up:
 
Error, (in fprintf) number expected for floating point format
 
what must I do? :)
 

@Preben Alsholm thanks a lot! it works! thanks for the additional info! really cool!

@Jarekkk 139 thank you so much! you pips made my day....:)

@Preben Alsholm thanks a lot! it works! thanks for the additional info! really cool!

@Jarekkk 139 thank you so much! you pips made my day....:)

this error shows up
Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations
i cant identify which part of the code below is wrong:
dsol2 := dsolve({ic2, deq2}, type = numeric, stiff = true, range = 0 .. 6.28)
 
 
please help..:) thanks!
this error shows up
Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations
i cant identify which part of the code below is wrong:
dsol2 := dsolve({ic2, deq2}, type = numeric, stiff = true, range = 0 .. 6.28)
 
 
please help..:) thanks!
Page 1 of 1