## 270 Reputation

8 years, 289 days

## Sequence of values of given funciton...

Dear all,

Thank you for helping me  to generate a table of values of f(x) starting with x=0 to 100 in steps of 1, that is for x=0,1,2,3,...,100.

I tried:

f:=x->2*sqrt(3)*a1*a2*(sum(pochhammer(1/3,k)*3^k*x^(3*k)/(3*k)! ,k=0..infinity)*sum(pochhammer(2/3,k)*3^k*x^(3*k+2)/(3*k+2)!  ,k=0..infinity)-sum(pochhammer(2/3,k)*3^k*x^(3*k+1)/(3*k+1)!  ,k=0..infinity)*sum(pochhammer(1/3,k)*3^k*x^(3*k+1)/(3*k+1)!  ,k=0..infinity));

tab_values:=[evalf(simplify(seq(Ni1(xx),xx=0..100)))];

But I the result is amazing.... I don't understand the problem.

Thanks

## The maxmesh option in odeplot ...

Dear all;

Thank you for helping me to solve this  question.

I solve an ode, but I have an error when I would like to plot the solution.

uanble to achieve continuous solution with requested accuracy of 0.1e-5 with maximum 128 point mesh (was able to get 0.14e-5), consider increasing `maxmesh` or using larger `abserr`
Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

I try to increase the point mesh or take a large abserr but always I have the same problem.

restart:
with(plots):

ode := diff(y(x), x, x) = x*y(x)+sqrt(x);

ics := y(0) = 0, y(1) = 1;
sol:=dsolve({ode,ics}, numeric):
odeplot( sol,[x, y(x)], x=0..1, maxmesh=1000);

## Writing simple procedure ...

Dear all;

Good morning everyone.

I solve a simple ode, i want how can I write this program as procedure with output the two coefficient involved in the solution, after solving with ics. i.e coef:=dsolve(ode);  in my example I want as output [4, -1] .

restart:
ode:=diff(y(x),x,x)=3*diff(y(x),x)-2*y(x);
coef:=dsolve(ode);
ics:=y(0)=3, D(y)(0)=2;
dsolve({ics,ode});

with best regards

## Problem with plot...

Maple

Dear all;

I need you to understand this problem...

when i plot the function, using the graph i see that the function is above the x-axis but when I compute some values of this function I get a negative values....like
evalf(y(99.6));  is a negative value, but in the graph it is possible... I don't  undertand the problem...

restart:
with(plots):

# funciton

y:=x->-4.1123583570*10^281*exp(-(2/3)*x^(3/2))/(x^(1/4)*sqrt(Pi))+1.6554662320*10^(-289)*exp((2/3)*x^(3/2))/(x^(1/4)*sqrt(Pi))+(16/153)*x^(7/6)*sqrt(Pi)*exp((2/3)*x^(3/2))+Pi*((1/2)*exp(-(2/3)*x^(3/2))*(-1+exp((2/3)*x^(2/3)))/(x^(1/4)*Pi)-(16/153)*x^(7/6)*exp((2/3)*x^(3/2))/sqrt(Pi)):

#I plot this function in the interval (a,b)

a:=99;b:=100; # interval (a,b)
forget(evalf): Digits:=20:
P1:=plottools:-transform((x,y)->[x+a,y])(plot(expand(y(x+a)),x=0..1,color=blue)):
forget(evalf): Digits:=4000:
P2:=plot(ysol, a..b, style=point, adaptive=false, numpoints=25, symbol=solidcircle, symbolsize=20, color=blue):
Digits:=20:
plots:-display(P1,P2);
evalf(y(99.6));

## Plot two function in the same graph ...

Maple

Dear all;

Thank you for helping me, to plot two function on the same graph.

restart;
with(plots):

ode := diff(y(x), x, x) = x*y(x)+x;
a:=2; b:=3;  # we work in the interval (a,b)
ics := y(a) = 0, y(b) = 1;
sol:=dsolve({ode,ics}, numeric):  # Solution of my ode

# First figure: solution of my ode in the interval (2,3)

odeplot( sol,[x, y(x)], x=a..b);  # I plot the solution in the interval (a,b)

# Here I define a second function

z:=x->-4.9354831550*exp(-(2/3)*x^(3/2))/(x^(1/4)*sqrt(Pi))+0.752447265e-1*exp((2/3)*x^(3/2))/(x^(1/4)*sqrt(Pi))+(16/153)*x^(7/6)*sqrt(Pi)*exp((2/3)*x^(3/2))+Pi*((1/2)*exp(-(2/3)*x^(3/2))*(-1+exp((2/3)*x^(2/3)))/(x^(1/4)*Pi)-(16/153)*x^(7/6)*exp((2/3)*x^(3/2))/sqrt(Pi));

# Here a code to plot this function z

forget(evalf):
Digits:=20:
P1:=plottools:-transform((x,z)->[x+a,z])(plot(expand(z(x+a)),x=0..1)):
forget(evalf): Digits:=4000:
plots:-display(P1,P2);  # Second figure

My question: I want one graph that shows the solution of my ode and the funciton z. ( i.e plot the two figures in only one graph).

Thanks for helping me.

 1 2 3 4 5 6 7 Last Page 3 of 21
﻿