Items tagged with homework homework Tagged Items Feed

Hello Everyone,

 

I would like  to write a code to calculate the riemann sum approximation of the curve sin(sqrt(x^2+y^2)+1 

calculate the actual volume using integration

use the ranges x=[-2pi to 2pi]=y, and 20 subdivisions.

also display the curve and the parallelepiped approximations on the same plot.

 my code give me  an error..please someone can advise me which part of my code is not correct..

Thanks very much in advance!

> g := proc (x, y) options operator, arrow; sin(sqrt(x^2+y^2))+1 end proc;

 Z := g(x, y);

 

 X := Array(0 .. n); Y := Array(0 .. n); Z := Array(0 .. n);

 

c := -2*Pi; d := 2*Pi;

a := -2*Pi; b := 2*Pi;

n := 15;

s := 0;

X[0] := a; Y[0] := c; Z := g[X[0], Y[0]]; s := 0;

dX := (b-a)/N;dY := (d-c)/N;

    for i from 0 to N do      for j from o to N do     s:=s+Z[i]*dX*dY     X[i]:=X[i-1]+dX: Y[i]:=Y[i-1]+dY: Z[i]:=g([Xi],[Yi])  end do;

This the error message i am getting (Error, unterminated loop)

 

 

 

 

 

 

 

 

hello everyone..

please...

I need help to write a code to calculate the riemann sum approximation of the curve cos(sqrt(x^2+y^2)+1 

calculate the actual volume using integration

use the ranges x=[-2pi to 2pi]=y, and 20 subdivisions.

also display the curve and the parallelepiped approximations on the same plot.

 

Thank you for your help!

hi everyone,

I need help writing a maple code to calculate the normal to the curve X^2-2X at x=1

and also display the curve, the tangent, and the normal on the same plot in the range x=[-2,2].

 

thank you for your help!

hello i need plot integrale of siampson thank you

> Simpson := proc(f, a, b, n)
> local h, S1, S2, S, i;
> h := (b-a)/n;
> S1 := 0.0;
> for i from 0 to n-1 do
> S1 := S1 + f(a + (2*i+1)*h);
> end do;
> S2 := 0.0;
> for i from 1 to n-1 do
> S2 := S2 + f(a + (2*i)*h);
> end do;
> S := (h/3) * ( f(a)+f(b) + 4*S1 + 2*S2 );
> return S;
> end proc:
> Digits := 5;

                             Digits := 5

> f := x -> 1/sqrt(39.24*x-44.65*(x*arccos(x)-sqrt(1-x^2)-13.88*(1-x^2)^1.5));

  f := x -> 1/sqrt(39.24 x

                                          2                2 1.5
         - 44.65 (x arccos(x) - sqrt(1 - x ) - 13.88 (1 - x )   ))

> Simpson(f, 0, 1, 100):
>
> p:=int(f(x), x=0..0.1);

                            p := 0.0038931

> w:=int(f(x), x=0.1..0.2);

                            w := 0.0039570

> m:=int(f(x), x=0.2..0.3);

                            m := 0.0040826

> l:=int(f(x), x=0.3..0.4);

                            l := 0.0042836

> kohv:=int(f(x), x=0.4..0.5);

                          kohv := 0.0045860

> q:=int(f(x), x=0.5..0.6);

                            q := 0.0050373

> s:=int(f(x), x=0.6..0.7);

                            s := 0.0057306

> d:=int(f(x), x=0.8..0.9);

                            d := 0.0089874

> f:=int(f(x), x=0.9..1);

                            f := 0.013349

Knowing that the Taylor series for cos(x) is:
sum := sum+(-1)^i*x^(2*i)/(2*i)!

How would I write the following Maple code?

Generate an animation sequence showing the Taylor series approximation of cos(x) from N=1..10, where N is the number of terms in the series. Each subsequent frame of the animation should show a more accurate representation of cos(x) than the previous one. Plot the animation from x = -2*Pi .. 2*Pi, y = -5 .. 5

How can I do if I wanted to simulate a class of 30 students rolling a dice 10 times, and you wished to count the number of 3's you observe for each student?

This is the simplest method to explain numerically solving an ODE, more precisely, an IVP.

Using the method, to get a fell for numerics as well as for the nature of IVPs, solve the IVP numerically with a PC, 10steps.

Graph the computed values and the solution curve on the same coordinate axes.

 

y'=(y-x)^2, y(0)=0 , h=0.1

Sol. y=x-tanh(x)

 

I don't know well maple. 

I study Advanced Engineering Math and using maple, but i am stopped in this test.

I want to know how solve this problem.

please teach me~ 

IT IS EULER's method

Hi there. I'm Student

i want to know how solve this problem.

please teach me! 

y'=(y-x)^2, y(0)=0, h=0.1

sol.y=x-tanh(x)

how solve this problem for maple? 

please teach me~

The details of the tasks are explained in the maple file attached but the aim is essentially to model the carbon cycle using first order diff eqs. I'm slightly confused as to how to exactly set up the equations for part a) and b). I've set up the required constants for the equations and the initial conditions as follows: 

#### initial conditions
atmos(0):=750;
bios(0):=600;
soil(0):=1500;


##### coefficients for rate of change
terrPhoto:=110/atmos(0);
terrResp:=110/bios(0);
plantDeath:=55/bios(0);
plantDecay:=55/soil(0);

and one of the equations as :

Diff(atmos(t),t):=terrPhoto*atmos(t); 

but I've been told that I would have to accommodate the direction of flow of carbon in the rates and also reconsider how many equations I would need.  hwk16.mw

I've got

f(x,y)= a.exp(1+xy) +( a^2 )*sin(x)+1

for which I've shown that there exists an implicit function x=g(y). ( df/dx <>0)

and df/dx = a*exp(1+xy) +( a^2 )*cosx now in the neighborhood of P=(0,0) for the implicit function to exist I'd need a*exp(1+xy)*y <>0 but at P, wouldn't this be 0?

Given, g(y)=x, how do I find the max,min,saddle points?

f:=sin((x-1)*(y+3))/(exp((x-1)^2+(y+3)^2)-1);
limit(f,{x=1,y=-3});


On running the above code, I don't get a result. I don't understand why, and what are some of the underlying math principles that I would have to use to evaluate the limit of f at (1,-3) if I were to solve this question on paper?

I need to find where the limit of the function:

{1-cos(x*y^3)}/(x^2+y^6)^(1+a) exists/does not exists for different values of a, given 0<=a<=1 and as (x,y)->(0,0).

I've tried writing a procedure that changes a in particular increments but that is clearly not the most efficient way. Are there any rules of limits that I should be using?

 

I've got a set

E:={(x,y,z): x^2+y^2=-2*z-x, z^2+y^2=1} and need to find points of E which have minimal or maximal distance from (0,0,0). I've set up the Lagrangian as F:=sqrt(x^2+y^2+z^2) + L1(x^2+y^2+2z+x)+L2(z^2+y^2-1)

and consequently obtained the equations:

x/sqrt(x^2+y^2+z^2) + 2*x*L1+L1=0

y/sqrt(x^2+y^2+z^2) + 2*y*L1+2*y*L2=0

z/sqrt(x^2+y^2+z^2)+2*L1+2*L2*z=0

for which I've set up
eqn1,eqn2,eqn3 as the three equations and vars:=x,y,z

and used solve() but I'm not getting the right answer( I need to first express x,y,z in terms of L1, L2 and then get values for L1 and L2 by substituting in the constraints and eventually get values of x,y,z.)

How should I implement that?

1.  a procedure quadsumstats whose input is an integer n. This procedure should return a list of length 

n whose kth  entry is the number of solutions to
x^2 + y^2 = k 
for
1 <= k and k <= n

I am sort of confused as to how to construct that list of length n and how to obtain integer solutions to the equation in maple.

2.

a procedure firstCount(k) that finds the first integer
n
with
k
representations as
"x^2+y^2= n." What does it mean for an integer to have k representations?

 

 

 

 

Hello,

 

How can I write a code to calculate the Rieman Sum for  y=x^1/2 [0..4] using 

left hand rule and 100 subdivision.

Thank you 

1 2 3 4 5 6 7 Last Page 2 of 18