Questions tagged [homework]

Homework questions are welcome, as long as they are asked honestly, explain the problem, and show sufficient effort. Please do not use this as the only tag for a question. Please do not add this tag to questions by other people unless they explicitly say that their question is part of their homework.

Filter by
Sorted by
Tagged with
0
votes
0answers
40 views

Cubic spline Interpolation Code

I've tried ...
-3
votes
1answer
79 views

Mathematica Linear Regression

How do I create a user-defined function for linear regression without using the built in function. Essentially doing the steps one by one
2
votes
0answers
60 views

Calculating double integral bounded by domain in Wolfram Alpha Notebook

If I want to compute Double Integral on a given region(See attached Picture) How can I input this on Wolfram Alpha Notebook
2
votes
2answers
159 views

Recreate specific plot in Mathematica

Can anyone help on this ? I did this ...
-1
votes
0answers
38 views

Plotting A Function Issues

I am trying to make a graph for this function. Consider the potential ϕ = (-x)/(x^2 + y^2). In the range (x, y) between (1, 1) and (6, 6), plot the potential as a colored field plot with black ...
-1
votes
0answers
32 views

Using If For Plotting Conditions

The problem: Plot f2(x) between x = -10 and x = +10, where f2(x) = -x^2 when x is negative, and f2(x) = +x2 otherwise. Do this problem twice: the first time with an `if' (as you did in problem 10), ...
1
vote
1answer
35 views

Mirroring the graph on the negative y axis

Another quick question, I have been trying to plot a phase plot, which has resulted in some issues. I know that there is a negative axis which it is also transposed on. However, when I include ...
0
votes
0answers
71 views

Function to determine number of trees surviving forest fire [duplicate]

How can I write two functions, each of which have as their argument an array mat of 0s (no trees), 1s (trees), 2s (burning trees), that can determine the trees that survived a forest fire, which run ...
0
votes
0answers
53 views

Writing a function that has two inputs

Write a function called DOTPRODUCT that has two inputs u and v, assumed to be two non-empty lists of numbers of arbitrary length, checks that the two lists are of equal length, prints an error message ...
0
votes
0answers
52 views

Map and Module to convert numerical value to grade [duplicate]

I have an assignment due next week, I've answered all other questions except for this one. I am required to use Module and Map ...
0
votes
1answer
51 views

Solve for not y = 0 but for y = n [closed]

Let’s see if I manage to explain this well enough. I need to find roots of an equation(let’s say a quartic) but not at the points where the slope crosses the $x$-axis (y = 0), like the ...
4
votes
4answers
322 views

Using the Tube function to create a torus from an equation for the curve

I've been searching for an answer for this for a while now, but I can't find anything that deals with using the Tube function to generate a torus from the equation of the torus. The equation of my ...
4
votes
1answer
116 views

How can I create a randomHop function that would return certain coordinates? [closed]

I've tried to create a function that's equal to a loop containing 4 if functions, one for each integer, but the result would not show the desired outcome. How can I go about doing this question? Write ...
0
votes
2answers
83 views

How can I find equation of the tangent line for a curve given in polar form? [closed]

Basic calculus Please tell me how to find the tangent at $θ=π/3$ in the form $y=ax+b$ of the curve represented by $r=(r-\cosθ)^2$.
0
votes
1answer
47 views

How to find an equation of a line using Mathematica [duplicate]

(b) Find an equation of the secant line through $ (−2, f(−2)) $ and $ (−1, f(−1)) $. Define this line as $ fs1(x) $ in Mathematica.
3
votes
1answer
103 views

Adams-Bashforth method implementation code review

I have a program for Adams-Bashforth method and I want to do some tries to see if it's working properly but I don't know how to do it. My code for AdamsBashforth is ...
0
votes
1answer
65 views

Using conditions to construct a function [closed]

This is the hint my professor provided. We have 6 separate cases to define the function pow[x_ , r_]. The first case is where ...
0
votes
0answers
28 views

Speed up my own Orthogonalize and QRDecomposition [duplicate]

I defined Gram-Schmidt like this: ...
3
votes
3answers
103 views

Get a triangle’s angles from the sides

Hint: For the SSS case, you are given the 3 sides a, b, and c, and need to find the corresponding angles α, β, and γ. To find α, for example, you solve the equation ...
0
votes
1answer
75 views

Solving an exponential inequality in two ways

I would like to solve the following inequality E^x/x^1000 >= 2 without Reduce. Then I would like to solve it with ...
1
vote
1answer
66 views

Half-life of a radioactive substance? [closed]

After 4.27 minutes 99.99% of a radioactive substance is present. What is the half-life of the radioactive substance? What code would I use to solve this problem? I don't know how to start it.
1
vote
1answer
106 views

Fixed point iteration with While or Do Loop

I need to write a while or do loop to perform the iteration $x_{n+1}=Cos(x_n)$ with initial value $x_0=1$ and stops when the absolute value of the difference between two consecutive iterations is $|x_{...
-3
votes
1answer
52 views

How can I solve this polynomial problem? [closed]

I'm very new to Mathematica. The only roots of a polynomial are 1, 2, 3, 4, and 5. The polynomial is positive on (-∞, 1), (1, 2), (4, 5) and negative on (2, 3), (3, 4), and (5, ∞). Give a polynomial ...
1
vote
3answers
108 views

What commands would I use to solve this problem? [closed]

I'm new to Mathematica. Starting from left to right give the intervals of a constant sign and the sign of the following polynomial on those intervals. Finally, I have to illustrate your results in two ...
1
vote
2answers
37 views

What does problem statement mean by “using the Table function”? [closed]

Can you help me on the following question? Generate the list {{0}, {0, 2}, {0, 2, 4}, {0, 2, 4, 6}, {0, 2, 4, 6, 8}} using the ...
1
vote
5answers
100 views

How to find the 2 smallest integers that is divisible by 40131 and 41405 [closed]

I'm trying to find the two smallest integers that is divisible by 40131 and 41405, i.e 40131|a, 41405|a, 40131|b and 41405|b. There is a hint within the question that says you can use FactorInteger[] ...
0
votes
1answer
67 views

Computmg the powers of a complex number? [closed]

this is the complex number im dealing with zb=(1/7)* (Cos[Pi/3]+I Sin[Pi/3]) I need to represent for the first 10 powers in the plane. I also need to label the ...
2
votes
2answers
88 views

Given s family of quadratics, plot them and show the minima of each curve

family function x^2 - 2*(m - 2)*x + m - 2 a) Create a Manipulate to explore the behaviour of the functions of this family for m ∈ [-10,10]. Mark the minimum value ...
2
votes
2answers
151 views

How can I fix my Simpson's rule integration code?

I was tasked with writing a function on Mathematica similar to NIntegrate, but that uses the Composite Simpson's Rule as its method for doing the calculation. The ...
0
votes
1answer
122 views

Solving particular case of Bernoulli Equation [closed]

I have a Bernoulli equation (attached below). It needs to be converted to ODE. I tried to solve it by a separation of variables, but I could not. Can anyone help me with the code for this, please?
0
votes
0answers
47 views

Solving multiple systems using Cholesky factorization to find Inverse of a matrix

I have a matrix: A = {{1, 1, 1, 1}, {1, 5, 5, 5}, {1, 5, 14, 14}, {1, 5, 14, 30}} I wrote code in Mathematica (mostly copying what professor gave us, I'm new to ...
-1
votes
1answer
52 views

Determining the acceleration of a particle [closed]

A particle travels along a straight line with a velocity of $V(t) = 3 e^{t/2}\,x\,\sin⁡(2\,t)$ m/s. Determine the acceleration of the particle at t = 2 seconds. V=3e^(0.5 t) x sin(2t) A=1.5^(0.5t) x ...
1
vote
2answers
64 views

How to use StreamPlot to plot the typical solution in this directional field?

How can I plot the typical solution in this directional field using StreamPlot? ...
2
votes
1answer
57 views

Writing a function to find ehe volume under$ |f(x,y)|$ over an area [closed]

I need to write a function to find the volume under a surface $|f(x, y)|$ and over an certain area. The output of the function is going to be the volume and a plot. For example: Given $|f(x,y)|=|3+x^2 ...
1
vote
1answer
115 views

Translating pseudocode for the Jacobi algorithm into Mathematica

Here is an image for the Jacobi algorithm. I have almost no knowledge of Mathematica, the textbook does not help. Does not provide examples. The class average is 64%. I just want to be able to ...
1
vote
1answer
66 views

Correcting error messages emitted by ListPlot

I have an assignment to use Module and in which I have to implement: The input of the program are a list of numbers and a list of strings Check whether every ...
4
votes
1answer
77 views

how to make my own `PrimeQ` function?

How can I create my own function that verifies if the number is a Prime without using PrimeQ ...
0
votes
1answer
46 views

Applying the command “expr/.rule”, to find the expansion of Cos[a+b]

how can i find the expansion of Cos[a+b], using the expression g[f[{a,b}]].So i am specified to use one shot replacement to get the expansion by replacing the argument of the expression given. I tried ...
2
votes
1answer
153 views

How to plot a characteristic curve for silicon diode

There is a figure given that shows the relation between Forward current(y axis) and forward Voltage (x axis ) for a forward biased diode, with the given formula $$If(forward current)= I0*e^{(k*q*T*...
3
votes
3answers
254 views

For Loop to Sum numbers in a list

I'm asked to create a For[] loop that will sum positive numbers in a list. I am unsure of how to do this. ...
1
vote
1answer
64 views

Create a list of pairs [closed]

I am trying to take a list of pairs and manipulate the second element. The question is as follows Create a list of pairs of numbers and set the resulting list of lists equal to ...
0
votes
1answer
82 views

Lagrange Interpolation [duplicate]

I have the following table with 90 elements, and I want to write a loop that gives me the Lagrange operators. I want to construct an interpolation with Lagrange interpolation and show the loop to ...
0
votes
0answers
38 views

Finding the volume by rotating the region bounded by the curves $y=\sin(x)$, $y=0$, $x=0$, $x= \pi$ about $y=-1$

I would like to find the volume of the region obtained by rotating the region bounded by the curves $y=\sin(x)$, $y=0$, $x=0$, $x=\pi$ about $y=-1$. Calc 2 wasn't a strong suit of mine, so this ...
1
vote
1answer
30 views

Can I sample from a distribution whose parameters depend on the current iteration?

Let's say I want to sample from 100 Beta distributions, and in each successive one, the first parameter increases by 1. So given a current iteration number n, I ...
1
vote
1answer
51 views

Prove that these statements about the integer x: If 3x + 7 is even, then x + 3 is even [closed]

Then there exists some integer k where x=2k So 3x+7=3(2k)+7 6k+7 This is as far as Ive got.
0
votes
1answer
41 views

Problem with Real Digits and and getting the sum of digits [closed]

I want to find the sum of the digits of the first 30 000 multiples of 31. I started by first finding the multiples. Like this: ...
1
vote
2answers
234 views

Dice Rolling Simulation [closed]

I'm simulating a sequence of dice rolls by choosing a random integer between 1 and 6. I need to use FoldList to generate a function that returns a list which describes how the cumulative total varies ...
1
vote
0answers
57 views

Filtering Fibonacci numbers for elements meeting certain criteria [closed]

Write a code that selects in less than two seconds from every 123rd of the first 33,333 even Fibonaci numbers; those which contain the digits 2, 3, 6, 7, and 8 and also contains the digit 1 more than ...
2
votes
2answers
151 views

Tensor contraction

How do I let mathematica compute a tensor contraction like $\delta_{ab}\delta_{bc}$ with an output $\delta_{ac}$ efficiently? I tried TensorContract and TensorReduce but they were not helpful. ...
5
votes
1answer
177 views

How to plot trajectories of the Rossler System [duplicate]

This is my current homework problem. I have completed parts a and b, but am now stuck on part c. I'm not sure what it means by plot the trajectories with different initial conditions, nor am I 100% ...

1
2 3 4 5