Items tagged with homework homework Tagged Items Feed

Write a Maple code that performs the Gaussian elimination for an nxn matrix, converting it to an upper triangular matrix. 

(Hint: you will need to use three for .. do loops.)

Write a recursive Maple procedure, called “decToBin”, that converts an integer from decimal (base 10) to binary (base 2). Ensure that only integers are allowed as arguments to the procedure. Passing a negative integer should result in no output. Test your procedure by outputting the result of the following:
decToBin(10)
decToBin(163)
decToBin(213)
decToBin(-1)
decToBin(“A”) # should result in an “invalid input” error

Hi Clever guys,
I am sorry if I asked for too much, but I am really in a big problem, I had a family problem and I didn't attend most of the lectures, and now I have to hand in an assignment before easter hollydays, and to be honest with you, I don't know from where to start, I know I will have to understand this stuff, but now I don't have enough time to do the assignment, so if anyone can help me, please please, for you guys it will maybe take 20min to do it, i ll need days and days and in the end it will be all wrong. I am going to try to do the other questions, there are 5 questions :(  
Please help me , I am really not a very bad student that just want to copie, but if nobody does this for me this time I will fell, please do this question for me please.. maybe you will say start it and then ask to check if it is correct, I am really trying my best, please.

that is one question:


By integrating a third order Newton Gregory Polynomial, derive Simpson’s

three eights rule given by

∫ f(x)dx (from x0 to x3 ) =3/8*ℎ(y0 + 3y1 + 3y2 + y3)

(b) Find the order of accuracy of Simpson’s rule and Simpson’s three eights rule.

(c) Write procedures to evaluate

∫ f(x)dx   (from x0 to xn) to a given number of decimal places using

i) Simpson’s rule.

ii) Simpson’s three eights rule.

The data to be input should be

i) The function f(x).

ii) x0 and xn .

iii) the number of decimal place accuracy required for the solution.

The output should comprise

 i) The number of strips used.

 ii) the value if the integral.





thank you very much 

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?

 

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